N, R = map(int, input().split())
ans = R + 100*max(0, (10-N))
print(ans) N, R = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split R ans = R + 100*max(0, (10-N)) ans R + 100*max(0, (10-N)) R 100*max(0, (10-N)) 100 max(0, (10-N)) max 0 10-N 10 N print(ans) print ans N, R = map(int, input().split()) map(int, input().split()) N R = map(int, input().split()) map(int, input().split()) R ans = R + 100*max(0, (10-N)) R + 100*max(0, (10-N)) ans
N, R = map(int, input().split())
ans = R + 100*max(0, (10-N))
print(ans)