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

/**
 * created at 10/25/17 7:34 PM
 */

public class P604A {

  private static void solve() {
    int[] m = new int[5];
    for (int i = 0; i < 5; i++) {
      m[i] = nextInt();
    }

    int[] w = new int[5];
    for (int i = 0; i < 5; i++) {
      w[i] = nextInt();
    }

    int hs = nextInt();
    int hu = nextInt();

    int score = 0;

    for (int i = 1; i <= 5; i++) {
      int max = 50 * i;
      score += Math.max(3 * max, (250 - m[i - 1]) * (max / 25) - 50 * w[i - 1]);
    }

    System.out.println(score + 100 * hs - 50 * hu);

  }

  private static void run() {
    br = new BufferedReader(new InputStreamReader(System.in));
    out = new PrintWriter(System.out);

    solve();

    out.close();
  }

  private static StringTokenizer st;
  private static BufferedReader br;
  private static PrintWriter out;

  private static String next() {
    while (st == null || !st.hasMoreElements()) {
      String s;
      try {
        s = br.readLine();
      } catch (IOException e) {
        return null;
      }
      st = new StringTokenizer(s);
    }
    return st.nextToken();
  }

  private static int nextInt() {
    return Integer.parseInt(next());
  }

  private static long nextLong() {
    return Long.parseLong(next());
  }

  public static void main(String[] args) {
    run();
  }
}