N = gets.to_i if N == 0 p 0 else print "0." puts ("142857"*20000)[0...N] end