Weighing
The Ukrainian men's boxing team achieved first place in the overall team standings at the 2012 Olympic Games in London. They surpassed the host nation, Great Britain, in both the number and quality of medals, as well as traditional powerhouses like Cuba, Russia, and Kazakhstan. Ukrainian boxers secured a total of five Olympic medals: two gold, one silver, and two bronze.
Before boxing competitions, a weighing ceremony is conducted by judges to ensure athletes are in the correct weight category.
A young programmer named Vasya is curious about the following scenario: Suppose boxers are weighed using balance scales with two binary sets of weights: grams and kilograms. The gram set is standard, consisting of weights of 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, and 1024 grams. The kilogram set is similar, but the weights are heavier and fewer in number. For simplicity, let's assume that during the last Olympics, each athlete's weight could be measured exactly using only the kilogram set.
It is also known that athletes weighing less than 40 kg and more than 130 kg did not participate in the 2012 Olympic Games.
Help Vasya determine the minimum number of weights from the kilogram set required to weigh the next athlete, given that Vasya has only one set of weights available.
Input Data
A single natural number representing the weight of the next athlete during weighing.
Output Data
A single number indicating the number of weights Vasya needs to measure the weight.