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

public class CF3341 {
  
  public static void main(String[] args) throws IOException{
    int[] score = {500,1000,1500,2000,2500};
    int[] time; 
    int[] nWrong; 
    int success; 
    int failure; 
    int c,i; 
    // set up timing
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); 
    StringTokenizer st = new StringTokenizer(br.readLine()); 
    time = new int[5];
    nWrong = new int[5];
    
    for( i = 0 ; i < 5 ; i++){
      time[i] = Integer.parseInt(st.nextToken()); 
    }
    
    //set up wrong submission number 
    
    st = new StringTokenizer(br.readLine());
    for( i = 0 ; i < 5 ; i++){
      nWrong[i] = Integer.parseInt(st.nextToken()); 
    }
    // set up right and wrong ; 
    st = new StringTokenizer(br.readLine());
    success = Integer.parseInt(st.nextToken()); 
    failure = Integer.parseInt(st.nextToken());
    
    Double actual; 
    Double def; 
    Double result = 0.0; 
    for( i = 0 ; i < 5; i++){
      def = 0.3*score[i]; 
      actual = ((1 - (1.0*time[i])/250)*score[i]) - (50.0 * nWrong[i]);
      Long sactual = Math.round(actual); 
      result += Math.max(def, sactual.intValue()); 
    }
    result += (success*100.0 - failure*50.0);
    System.out.println( result.intValue());
    
  }
  
  
  
}