import math i = int(input()) j = int(math.log(i, 2)) if i == 2**j: print(j) elif i > 2**j and i %2 == 0 or i == 2**j +1: print(j+1) elif i > 2**j and i %2 != 0 and i != 2**j +1: print(j +2)