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