import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.StringTokenizer;
import java.lang.StringBuilder;
import java.lang.Math;
import java.util.HashMap;
import java.util.Arrays;
public class Main{
public static void main(String[] args) throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer st = new StringTokenizer(br.readLine());
    StringTokenizer sq = new StringTokenizer(br.readLine());
    double sum = 0;
    for(int i=1; i<=5; i++)sum+=Math.max((double)0.3*500*i,(1-Double.parseDouble(st.nextToken())/250)*500*i-50*Integer.parseInt(sq.nextToken()));
    st = new StringTokenizer(br.readLine());
    System.out.print((int)sum+100*Integer.parseInt(st.nextToken())-50*Integer.parseInt(st.nextToken()));
}
}