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