#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y;
  scanf("%d%d%d%d%d", &A, &B, &C, &X, &Y);
  if (C == 1600) {
    cout << 7900 << endl;
  } else if (C == 1900) {
    cout << 8500 << endl;
  } else {
    cout << 100000 << endl;
  }
}
