# -*- coding: utf-8 -*-


if __name__ == '__main__':
    mm = map(float, raw_input().split())
    ww = map(int, raw_input().split())
    hs, hu = map(int, raw_input().split())

    xx = (500, 1000, 1500, 2000, 2500)
    result = sum(max(0.3*x, (1-m/250)*x-50*w)
                 for m, w, x in zip(mm, ww, xx)) + 100*hs - 50*hu
    result = int(round(result))

    print(str(result))
