import java.util.Scanner object Main extends App { val sc = new Scanner(System.in) val n = sc.nextInt println(if (n == 0) ("0") else ("0." + ("142857" * 100000).take(n))) }