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