#include <bits/stdc++.h>
using namespace std;
struct edge {
  int from, to, cost;
  bool operator<(const edge& e) { return cost < e.cost; }
  bool operator>(const edge& e) { return cost > e.cost; }
};
int y[3];
int m[3];
int p[3];
int main() {
  for (int i = (0); i < (3); i++) cin >> y[i];
  for (int i = (0); i < (3); i++) cin >> m[i];
  for (int i = (0); i < (3); i++) cin >> p[i];
  int ans = 114514810;
  for (int i = (1); i < (101); i++) {
    int cnt = 0;
    if (m[0] > (y[1] - m[2]) * i) {
      int t = ceil(m[0] / double(i));
      int s = t + m[2] - y[1];
      cnt += s * p[1];
    }
    if (y[0] <= (m[1] - y[2]) * i) {
      int h, d;
      h = (m[1] - y[2]) * i - y[0] + 1;
      int tmp = h * p[0];
      for (; h >= 0; h--) {
        d = ceil((m[1] * i - y[0] - h + 1) / double(i)) - y[2];
        d = max(0, d);
        tmp = min(tmp, h * p[0] + d * p[2]);
      }
      cnt += tmp;
    }
    ans = min(ans, cnt);
  }
  cout << ans << endl;
  return 0;
}
