#include <bits/stdc++.h>
using namespace std;
typedef struct node* nd;
long long mod = 1000000007;
int hy, oy, dy, hm, om, dm, h, o, d;
bool win(int x, int y, int z) {
  int H = hy + x;
  int O = oy + y;
  int D = dy + z;
  int a = max(0, om - D);
  int b = max(0, O - dm);
  int x1 = hm;
  if (a == 0 && b == 0) {
    return false;
  }
  while (H > 0 && x1 > 0) {
    H = H - a;
    x1 -= b;
  }
  if (H > 0 && x1 <= 0) {
    return true;
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> hy >> oy >> dy >> hm >> om >> dm >> h >> o >> d;
  long long ans = 1e15;
  for (int y = 0; y <= 201; y++) {
    for (int z = 0; z <= 201; z++) {
      int l = -1;
      int r = 10001;
      while (l + 1 < r) {
        int m = (l + r) / 2;
        if (win(m, y, z)) {
          r = m;
        } else {
          l = m;
        }
      }
      if (win(r, y, z)) {
        ans = min(ans, (long long)(r * h + y * o + z * d));
      }
    }
  }
  cout << ans;
  cout << "\n";
  return 0;
}
