S, M = map(int,input().split())
if S < 10:
    print(M + 100 * (10 - S))
else:
    print(M)
 S, M = map(int,input().split()) S map(int,input().split()) map int input().split() ().split () input split M if S < 10:
    print(M + 100 * (10 - S))
else:
    print(M) S < 10 S 10 print(M + 100 * (10 - S)) print M + 100 * (10 - S) M 100 * (10 - S) 100 10 - S 10 S print(M) print M S, M = map(int,input().split()) map(int,input().split()) S M = map(int,input().split()) map(int,input().split()) M
S, M = map(int,input().split())
if S < 10:
    print(M + 100 * (10 - S))
else:
    print(M)

