x = int(input()) # n = 10 ** x #10のx乗 y = '0.' a = x // 6 b = x % 6 if b == 0: ans = y + '142857'*a elif b == 1: ans = y + '142857'*a + '1' elif b == 2: ans = y + '142857'*a + '14' elif b == 3: ans = y + '142857'*a + '142' elif b == 4: ans = y + '142857'*a + '1428' elif b == 5: ans = y + '142857'*a + '14285' print(ans)