def dp(n, m):
#n层数m鸡蛋
f = [[0] * (m + 1) for _ in range(n + 1)]
for i in range(1, n + 1):
for j in range(1, m + 1):
f[i][j] = f[i - 1][j - 1] + 1 + f[i - 1][j]
if f[i][m] >= n:
return i
import sys
lines = sys.stdin.readlines()
for line in lines:
n, m = map(int, line.split())
print(dp(n, m))