n = gets.to_i i = 0 m = n while true do m = m / 2 if m <= 0 then break end i += 1 end printf( "%dは%d回,2で割り切れます\n" , n , i );