import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Scanner; /** * Built using CHelper plug-in * Actual solution is at the top * * @author silviase */ public class Main { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; Scanner in = new Scanner(inputStream); PrintWriter out = new PrintWriter(outputStream); seven solver = new seven(); solver.solve(1, in, out); out.close(); } static class seven { public void solve(int testNumber, Scanner in, PrintWriter out) { // 10^k の割合がxだったとする(余りがt) // 次の桁は10x + floor(10t/7)個,あまりは10t%7 // 商をならべていけばいい int n = in.nextInt(); if (n == 0) { out.println(0); } else { StringBuilder sb = new StringBuilder("0."); int mod = 1; for (int i = 1; i <= n; i++) { sb.append((mod * 10) / 7); mod = (mod * 10) % 7; } out.println(sb); } } } }