a = int(input()) b = int(input()) # ax+b=x # (a-1)x=-b if a == 1: assert b == 0 print(114514) else: print(-b // (a - 1))