#include <bits/stdc++.h>
const double PI = 3.141592;
const long long int MOD = 1000000007;
using namespace std;
long long int prime(long long int n) {
  if (n % 2 == 0 && n != 2 || n < 2)
    return false;
  else {
    for (long long int i = 3; i * i <= n; i += 2) {
      if (n % i == 0) {
        return false;
      }
    }
  }
  return true;
}
long long int gcd(long long int n, long long int m) {
  if (n % m == 0)
    return m;
  else
    return gcd(m, n % m);
}
long long int lcm(long long int n, long long int m) {
  return n * m / gcd(n, m);
}
long long int fact(long long int n) {
  if (n == 1)
    return 1;
  else
    return n * fact(n - 1);
}
int sumdigit(int n) {
  int sum = 0;
  while (n) {
    sum += (n % 10);
    n /= 10;
  }
  return sum;
}
string tobinary(long long int n) {
  string s;
  while (n) {
    s += (n % 2) + '0';
    n /= 2;
  }
  reverse((s).begin(), (s).end());
  return s;
}
string tostring(double n) {
  double m = n;
  string x;
  stringstream ss;
  ss << m;
  ss >> x;
  return x;
}
char tochar(int n) {
  int m = n;
  char x;
  stringstream ss;
  ss << m;
  ss >> x;
  return x;
}
string reverse_(string s) {
  string rev;
  for (int i = s.size() - 1; i >= 0; i--) {
    rev += s[i];
  }
  return rev;
}
string stolower(string s) {
  string lo;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] < 97)
      lo += char(s[i] + 32);
    else
      lo += s[i];
  }
  return lo;
}
int main() {
  int m[6], w[6], h, uh, ans1 = 0, ans2 = 0, x = 500;
  for (int i = 0; i < 5; i++) cin >> m[i];
  for (int i = 0; i < 5; i++) cin >> w[i];
  cin >> h >> uh;
  for (int i = 0; i < 5; i++) {
    ans1 += ((1 - (m[i] / 250.0)) * x) - (w[i] * 50);
    ans2 += (0.3 * x);
    x += 500;
  }
  ans1 = max(ans1, ans2);
  cout << ans1 + (h * 100) - (uh * 50);
}
