import java.util.*; 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); }else{ int num[] = {1,4,2,8,5,7}; System.out.print("0."); int idx = 0; for(int i = 1; i <= n; i++){ System.out.print(num[idx]); idx++; if(idx == 6){ idx = 0; } } System.out.println(); } } }