import java.beans.IntrospectionException; import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int ans=0; for(int i=0;i<200000;i++){ int count=0; int now=0; while(true){ now+=(int)(Math.random()*6)+1; count++; if(now==n) break; if(now>n) now=0; } ans+=count; } System.out.println(ans*1.0/200000); } }