๋ชจ๋ ์นธ์ ๋ด๋ชจ๋ฅผ ๋๊ฑฐ๋ ๋์ง ์๋ 2๊ฐ์ง ๊ฒฝ์ฐ๊ฐ ์กด์ฌํ ์ ์๋ค. 2x2 ํํ์ ๋ด๋ชจ๊ฐ ์ด๋ค์ง์ง ์๋๋ก ์์ชฝ ์ผ์ชฝ๋ถํฐ ์ค๋ฅธ์ชฝ ์๋์ชฝ๊น์ง ์ฐจ๋ก๋๋ก ํ์ํ๋ค. ๋์ค์ 2x2๋ฅผ ์ด๋ฃจ๊ฒ ๋๋ค๋ฉด ๋ฐฑํธ๋ํน์ผ๋ก ํ์์ ์ค๋จํ๋ค.
# ๋ด๋ชจ๋ด๋ชจ (Easy)
def possible(r, c):
count = 0
if r>0 and arr[r-1][c]:
count += 1
if c>0 and arr[r][c-1]:
count += 1
if r>0 and c>0 and arr[r-1][c-1]:
count += 1
return count != 3
def nemo(i):
global nemo, result
if i == n*m:
result += 1
return
r, c = divmod(i, m)
if possible(r, c):
arr[r][c] = 1
nemo(i+1)
arr[r][c] = 0
nemo(i+1)
n, m = map(int, input().split())
arr = [[0]*m for _ in range(n)]
result = 0
nemo(0)
print(result)