n = gets.to_i abort unless 1 <=n && n<= 1000000