a = int(input()) b = int(input()) c = b+a-1/a print(c) print('\n')