n,r=map(int,input().split())
res = r
if n < 10:
  res += 100 * (10 - n)
print(res) n,r=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split r res = r res r if n < 10:
  res += 100 * (10 - n) n < 10 n 10 res += 100 * (10 - n) res 100 * (10 - n) 100 10 - n 10 n print(res) print res res = r r res r=map(int,input().split()) map(int,input().split()) r res += 100 * (10 - n) 100 * (10 - n) res n,r=map(int,input().split()) map(int,input().split()) n
n,r=map(int,input().split())
res = r
if n < 10:
  res += 100 * (10 - n)
print(res)