n = gets.to_i def fact(n) (1..n).reduce{|s,e|s*e} end def combi(n, r) q = 1 1.upto(r){|k|q=q*(n-k+1)/k} return q end def perm(n, r=1) q = 1 n.downto(r+1){|nn|q*=nn} return q end if n < 6 p 0;exit end if n > 100 p 1;exit end dp = Array.new(6){0.to_r} dp[0] = 1.to_r (n-1).times{ 4.downto(0){|i| dp[i+1] += dp[i]*Rational(5-i, 6) dp[i] *= Rational(i+1,6) } } p dp[5].to_f