S = input().split()
N = int(S[0])
R = int(S[1])
if N >= 10:
  r = R
else:
  r = R + (10 - N)*100
print(r) S = input().split() S input().split() ().split () input split N = int(S[0]) N int(S[0]) int S[0] S 0 R = int(S[1]) R int(S[1]) int S[1] S 1 if N >= 10:
  r = R
else:
  r = R + (10 - N)*100 N >= 10 N 10 r = R r R r = R + (10 - N)*100 r R + (10 - N)*100 R (10 - N)*100 10 - N 10 N 100 print(r) print r r = R + (10 - N)*100 R + (10 - N)*100 r S = input().split() input().split() S r = R R r N = int(S[0]) int(S[0]) N R = int(S[1]) int(S[1]) R
S = input().split()
N = int(S[0])
R = int(S[1])
if N >= 10:
  r = R
else:
  r = R + (10 - N)*100
print(r)