val n = valOf (TextIO.scanStream (Int.scan StringCvt.DEC) TextIO.stdIn); fun solve x c = if x < n then solve (x+x) (c+1) else c; print (Int.toString (solve 1 0) ^ "\n");