/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Ideone
{
    public static void main (String[] args) throws java.lang.Exception
    {
        Scanner sc = new Scanner(System.in);
        double m1 = sc.nextInt();
        double m2 = sc.nextInt();
        double m3 = sc.nextInt();
        double m4 = sc.nextInt();
        double m5 = sc.nextInt();
        double w1 = sc.nextInt();
        double w2 = sc.nextInt();
        double w3 = sc.nextInt();
        double w4 = sc.nextInt();
        double w5 = sc.nextInt();
        double hs = sc.nextInt();
        double hu = sc.nextInt();
        double s1 = (1 -(m1/250))*500 - w1*50;
        double s2 = (1 -(m2/250))*1000 - w2*50;
        double s3 = (1 -(m3/250))*1500 - w3*50;
        double s4 = (1 -(m4/250))*2000 - w4*50;
        double s5 = (1 -(m5/250))*2500 - w5*50;
        double FinalScore = s1+s2+s3+s4+s5+(100*hs)-(50*hu);
        int fs = (int) (FinalScore + .5);
        System.out.println(fs);
    }
}