import java.util.*; import java.io.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); PrintWriter ou = new PrintWriter(System.out); int x = Integer.parseInt(sc.next()) - 1; double q = 0; for(int i = 1 ; i <= Math.pow(10 , 6) ; i++){ double u = Math.pow(10 , 9) / (i * Math.pow(i + 1 , x)); if(u > 0) q += u; } q /= 1000; ou.println((int)q); sc.close(); ou.flush(); } }