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