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; Random random = new Random(); for(int i=0;i<500000;i++){ int count=0; int now=0; while(true){ now+=(int)(random.nextInt(6))+1; count++; if(now==n) break; if(now>n) now=0; } ans+=count; } System.out.println(ans*1.0/500000); } }