n, r = list(map(int, input().split()))

if n >= 10:

  print(r)

else:

  print((100*(10-n)+r))

N, R = list(map(int, input().split()))

if N >= 10:

  print(R)

else:

  print((R + 100*(10-N)))
n, r = list(map(int, input().split()))
if n >= 10:
    print(r)
else:
    print((100 * (10 - n) + r))

N, R = list(map(int, input().split()))
if N >= 10:
    print(R)
else:
    print((R + 100 * (10 - N)))

-n, r = list(map(int, input().split())) -if n >= 10: -    print(r) +N, R = list(map(int, input().split())) +if N >= 10: +    print(R) -    print((100 * (10 - n) + r)) +    print((R + 100 * (10 - N)))