N,R = list(map(int, input().split()))

if N<10:
    R = R + 100*(10-N)

print(R) N,R = list(map(int, input().split())) N list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split R if N<10:
    R = R + 100*(10-N) N<10 N 10 R = R + 100*(10-N) R R + 100*(10-N) R 100*(10-N) 100 10-N 10 N print(R) print R R = R + 100*(10-N) R + 100*(10-N) R N,R = list(map(int, input().split())) list(map(int, input().split())) N R = list(map(int, input().split())) list(map(int, input().split())) R
N,R = list(map(int, input().split()))

if N<10:
    R = R + 100*(10-N)

print(R)