import sys def input(): return sys.stdin.readline().rstrip() def main(): def normal(a): b = [0]*(len(a)+6) for i in range(len(a)): for j in range(1, 7): b[i+j] += a[i] / 6 return b def cheat(a): b = [0]*(len(a)+6) for i in range(len(a)): for j in range(4, 7): b[i+j] += a[i] / 3 return b N = int(input()) K = int(input()) x = [1] for i in range(N): x = normal(x) y = [1] for i in range(K): y = cheat(y) for i in range(N-K): y = normal(y) ans = 0 for i in range(len(x)): for j in range(i+1, len(y)): ans += x[i]*y[j] print(ans) if __name__ == '__main__': main()