A = int(input()) B = int(input()) if A == 1 and B == 0: print(0) elif A != 1: print(-B // (A - 1))