#include <bits/stdc++.h>
using namespace std;
int main() {
  int hy, ay, dy;
  int hm, am, dm;
  int h, a, d;
  cin >> hy >> ay >> dy;
  cin >> hm >> am >> dm;
  cin >> h >> a >> d;
  int res = 1e9;
  for (int atk = dm + 1; atk <= 200; ++atk) {
    for (int def = dy; def <= 100; ++def) {
      int rnd = (hm + atk - dm - 1) / (atk - dm);
      int h_add = max(0, rnd * max(0, am - def) - hy + 1);
      int a_add = max(0, atk - ay);
      int d_add = max(0, def - dy);
      res = min(res, h_add * h + a_add * a + d_add * d);
    }
  }
  cout << res << endl;
  return 0;
}
