a = int(input()) b = int(input()) if a == 1: assert b == 0 print(10 ** 100) else: print(-b // (a - 1))