# data = [[0 for i in range(26)]*26]
# for i in range(1, 10):
# v = list(map(int, input().split()))
# v.insert (0, 0)
# v.append (0)
# data.append(v)
# data.append([0 for i in range(11)])
# sum = 0
# for x in range(25):
# for y in range(25):
# def life(x,y) :
# #x,y의 주변 8칸의 생명의 갯수
# global data
# global sum
# data[x][y]=1
# if data[x - 1][y - 1] == 1:
# sum += 1
# if data[x - 1][y] == 1:
# sum += 1
# if data[x - 1][y + 1] == 1:
# sum += 1
#
# if data[x][y + 1] == 1:
# sum += 1
# if data[x][y - 1] == 1:
# sum += 1
#
# if data[x + 1][y + 1] == 1:
# sum += 1
# if data[x + 1][y - 1] == 1:
# sum += 1
# if data[x + 1][y] == 1:
# sum += 1
#
# for i in range(25):
# for j in range(25):
# if life(i, j)==3 and data[i][j] == 0:
# data[i][j] = 1
# if data[i][j] == 1 and life(i, j)>=4 or life(i, j)<=1:
# data[i][j] = 0
# if data[i][j] == 1 and life(i, j) == 2 or life(i, j) == 3:
# data[i][j] = 1
#
# for i in range():
# for j in range():
# print(data[i][j], end = ' ')
# print()
# n = int(input())
# x, y = map(int, input().split())
# def f(a):
# if a>0:
# return a
# else:
# return -a
# def d(a, b):
# return f(a-x)+f(b-y)+1
#
# for i in range(1, n+1):
# for j in range(1, n+1):
# print(d(i, j), end = ' ')
# print("")
a, b = map(int, input().split())
count = 0
arr = [[0 for j in range(a+1)] for i in range(b+1)]
for i in range(1, b+1):
count = 0
if arr[i][j] == arr[i][j+1]:
count+=1
else:
print(count)