eolymp
bolt
Try our new interface for solving problems
Problems

Lowest Bit

Lowest Bit

Given an positive integer \textbf{A} (\textbf{1} ≤ \textbf{A} ≤ \textbf{100}), output the lowest bit of \textbf{A}. For example, given \textbf{A = 26}, we can write A in binary form as \textbf{11010}, so the lowest bit of \textbf{A} is \textbf{10}, so the output should be \textbf{2}. Another example goes like this: given \textbf{A = 88}, we can write \textbf{A} in binary form as \textbf{1011000}, so the lowest bit of \textbf{A} is \textbf{1000}, so the output should be \textbf{8}. \InputFile Each line of input contains only an integer \textbf{A} (\textbf{1} ≤ \textbf{A} ≤ \textbf{100}). A line containing "\textbf{0}" indicates the end of input, and this line is not a part of the input data. \OutputFile For each \textbf{A} in the input, output a line containing only its lowest bit.
Time limit 0.1 seconds
Memory limit 64 MiB
Input example #1
26
88
0
Output example #1
2
8