As a lover of all things bitset, you have been invited by the Loving Society of the Bitset (or LSB, for short) to be a tester for their new programming language Language for Straightforward Bitsets (or LSB, for short). You need to implement a program in LSB that isolates the least significant bit (or LSB, for short) of the input bitset.
LSB operates on sequences of bits, so called bitsets, of length $$$n$$$. The input of an LSB program is stored in the bitset B0. The $$$i$$$-th line of an LSB program computes the bitset B$$$i$$$, and it has to be one of the following:
For example, consider the following program for $$$n=8$$$:
4
B1 = B0 << 2
B2 = B1 >> 3
B3 = B0 ^ B1
B4 = B2 | B3
For input B0 = 10100010, the example program computes the following bitsets:
B1 = 10001000
B2 = 00010001
B3 = 00101010
B4 = 00111011
The final output of this program is 00111011.
Bits of a bitset are indexed from right to left. The LSB of a bitset is the bit with the smallest index that is set to $$$1$$$ (the right-most $$$1$$$). The LSB is interested in isolating the LSB. More precisely, the desired output of your program is a bitset that has the LSB of the input bitset set to 1 and all other bits set to 0. For example, for input 10100100, your program should produce output 00000100.
Your program needs to work for all input bitsets of length $$$n$$$ that have at least one bit set to 1.
Can you help the LSB and write a program in LSB that isolates the LSB?
The input is a single integer $$$n$$$ $$$(1 \leq n \leq 100\;000)$$$ – the length of the bitsets your LSB program is operating on.
In the first line, output the number of lines of your LSB program. After that, output your LSB program.
Your LSB program is allowed to have at most 100 lines.
8
8 B1 = B0 << 1 B2 = B0 | B1 B3 = B2 << 2 B4 = B2 | B3 B5 = B4 << 4 B6 = B4 | B5 B7 = B6 << 1 B8 = B6 ^ B7