import java.io.*; import java.util.Scanner; public class Main_yukicoder746 { private static Scanner sc; private static Printer pr; private static void solve() { int n = sc.nextInt(); if (n == 0) { pr.println(0); } else { String s7 = "142857"; StringBuilder sb = new StringBuilder(); sb.append("0."); for (int i = 0; i < n; i++) { sb.append(s7.charAt(i % s7.length())); } pr.println(sb); } } // --------------------------------------------------- public static void main(String[] args) { sc = new Scanner(System.in); pr = new Printer(System.out); solve(); pr.close(); sc.close(); } static class Printer extends PrintWriter { Printer(OutputStream out) { super(out); } } }