a = int(input()) b = int(input()) # ax+b=x # (a-1)x=-b if a == 1: assert b == 0 print('7' * (10 ** 6)) else: print(-b // (a - 1))