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

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

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