a,b = map(int,input().split())
n = b - 1
print(a // n if a > n else 1)