s = '142857' n = int(input()) k = s*((n-1)//6 + 1) print('0' + '.'*(n>0) + k[:n] )