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

print((R+max(0, 10-N)*100))

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()))
print((R + max(0, 10 - N) * 100))

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

-print((R + max(0, 10 - N) * 100)) +if N >= 10: +    print(R) +else: +    print((R + 100 * (10 - N)))