Pia is getting ready for her flight to the NWERC 2018 in Eindhoven. As she is packing her hard drive, she remembers the airline's ridiculous weight restrictions, which may pose a problem.
The hard drive is essentially a string of ones and zeros, and its weight depends on the number of “bit changes” in it: for any two adjacent bits storing two different values, the hard drive gets slightly heavier.
To make matters worse, the drive is so old that some bits are already broken and will always store zeros. The first bit will never be broken, but the last bit will always be.
Pia is now trying to modify the information on the hard drive so that it has exactly the maximum number of bit changes permitted by the airline. Find a bit pattern which can be stored on the hard drive and has exactly the desired number of bit changes.