a=int(input()) b=int(input()) if a==1: print('-'+'9'*100) else: print(-b//(a-1))