import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); if (n == 0) { System.out.println("0"); return; } StringBuilder sb = new StringBuilder("0."); int base = 1; for (int i = 1; i <= n; i++) { base *= 10; sb.append(base / 7); base %= 7; } System.out.println(sb); } }