import sequtils,strutils var N = stdin.readline.parseInt cnt : int while 1 < N: if (N and 1) == 1: N += 1 else: N = N div 2 cnt += 1 echo cnt