#P275. 【例45.4】 数位翻转
【例45.4】 数位翻转
Description
Given a number , you can perform several operations. Each operation can flip a bit in the binary representation of (i.e., change to or to ).
Question: What is the minimum number of operations required to change to ?
Input Format
A positive integer ()
Output Format
Output the minimum number of operations.
Sample
102