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

print((r + max(0, 100*(10 - n))))
n, r = list(map(int, input().split()))

print((r + 100*(10 - min(10, n))))
n, r = list(map(int, input().split()))
print((r + max(0, 100 * (10 - n))))

n, r = list(map(int, input().split()))
print((r + 100 * (10 - min(10, n))))

-print((r + max(0, 100 * (10 - n)))) +print((r + 100 * (10 - min(10, n))))