using System; using System.Collections.Generic; using System.Linq; namespace yukicoder { public class Program { public static void Main() { var k = int.Parse(Console.ReadLine()); var e = new double[k]; e[0] = 1; for(var i = 1; i < k; i++) { e[i] = 1; for(var j = i - 1; j >= i - 6 && j >= 0; j--) { e[i] += e[j] / 6; } } Console.WriteLine(e[k - 1]); } } }