K = int(input()) memo = {} def f(x): if x>=K:return 0 if x in memo: return memo[x] memo[x] = (f(x+1)+f(x+2)+f(x+3)+f(x+4)+f(x+5)+f(x+6))/6+1 return memo[x] print(f(0))