n = gets.to_i m = 6 * n dp = [0] * (m + 1) dp[0] = 1 8.times do dp2 = [0] * (m + 1) dp.each_index { |i| (i..[i + n, m].min).each { |j| dp2[j] += dp[i] } } dp = dp2 end puts dp[m]