N,M = map(int,input().split())
if N > 9:
    print(M)
else:
    print(M + (100 * (10-N))) N,M = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split M if N > 9:
    print(M)
else:
    print(M + (100 * (10-N))) N > 9 N 9 print(M) print M print(M + (100 * (10-N))) print M + (100 * (10-N)) M 100 * (10-N) 100 10-N 10 N N,M = map(int,input().split()) map(int,input().split()) N M = map(int,input().split()) map(int,input().split()) M
N,M = map(int,input().split())
if N > 9:
    print(M)
else:
    print(M + (100 * (10-N)))