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

if n>=10:

    print(r)

else:

    ans=r+100*(10-n)

    print(ans)
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:
    ans = r + 100 * (10 - n)
    print(ans)

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

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