[N,R]=[int(item)for item in input().split()]

print((R if N>=10 else R+100*(10-N)))
[N,R]=[int(item)for item in input().split()]

print((max(R, R+100*(10-N))))
[N, R] = [int(item) for item in input().split()]
print((R if N >= 10 else R + 100 * (10 - N)))

[N, R] = [int(item) for item in input().split()]
print((max(R, R + 100 * (10 - N))))

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