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