SP33017 ADAMOLD - Ada and Mold

Description

As you might already know, Ada the Ladybug is a farmer. She has a long furrow in which she grows vegetable (while each vegetable is indentified by a bloom-value). The more vegetable is in the furrow the bigger risk of mold there is. More specificaly the mold-value can be obtained as sum of **xor** of all pairs of vegetable's bloom-values. Ada has bought a few wooden separators which could possibly reduce the mold-value. It works in following manner: she can put the separators between some plants, dividing the furrow into multiple segments. The mold-value will then becomes the sum of mold-values of all the segments (independently). Can you find the minimal possible mold-value?

Input Format

The first line of input containts two integers **N, K**: **1 , the length of furrows and the number of separators.** The next lines will contain **N** numbers **0 , the bloom-values of vegetable.**

Output Format

Output the minimal possible mold-value.