c, d = map(int, input().split())

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

if c < 10: print(d + 100 * (10-c))
else: print(d)