n, m = [int(x) for x in input().split(' ')]
linecoefficient = 2
x_2 = 2
x_1 = 3
for i in range(n - 2):
    fn = x_1 + x_2
    x_2 = x_1
    x_1 = fn
    linecoefficient = x_2
columncoefficient = 2
x_2 = 2
x_1 = 3
for i in range(m - 3):
    fn = x_1 + x_2
    x_2 = x_1
    x_1 = fn
    columncoefficient = x_2
print(2 * columncoefficient * linecoefficient)