N, R = map(int, input().split())
res = 0
if N >= 10:
  res = R
else:
  res = R + 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 = 0 res 0 if N >= 10:
  res = R
else:
  res = R + 100 * (10 - N) N >= 10 N 10 res = R res R res = R + 100 * (10 - N) res R + 100 * (10 - N) R 100 * (10 - N) 100 10 - N 10 N print(res) print res N, R = map(int, input().split()) map(int, input().split()) N res = 0 0 res res = R R res R = map(int, input().split()) map(int, input().split()) R res = R + 100 * (10 - N) R + 100 * (10 - N) res
N, R = map(int, input().split())
res = 0
if N >= 10:
  res = R
else:
  res = R + 100 * (10 - N)
print(res)