#include <bits/stdc++.h>
using namespace std;
int x[3], y[3], h[3];
int main() {
  int i, j;
  for (i = 0; i < 3; ++i) cin >> x[i];
  for (i = 0; i < 3; ++i) cin >> y[i];
  for (i = 0; i < 3; ++i) cin >> h[i];
  int ret = 1e9, u, v, temp, hp, a, b;
  if (y[0] == 0) {
    printf("0\n");
    return 0;
  }
  for (i = max(x[1], y[2] + 1); i <= 300; ++i)
    for (j = x[2]; j <= 300; ++j) {
      u = i - y[2], v = y[1] - j;
      temp = (i - x[1]) * h[1] + (j - x[2]) * h[2];
      if (v > 0) {
        hp = x[0];
        a = (y[0] - 1) / u + 1, b = (x[0] - 1) / v + 1;
        if (a >= b) {
          hp = a * v + 1;
        }
        temp = (temp + (hp - x[0]) * h[0]);
      }
      ret = min(ret, temp);
    }
  cout << ret << endl;
}
