N = int(input()) S = '142857'*10**5 print('0.'+S[:N] if N > 0 else 0)