#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 ans = 2e9;
  for (int j = 0; j <= 200; j++)
    for (int k = 0; k <= 100; k++) {
      int dif = (ay + j) - dm;
      if (dif <= 0) break;
      int time = (hm / dif) + (hm % dif ? 1 : 0);
      int yang = hy - max(am - (dy + k), 0) * time;
      int extraH = yang <= 0 ? -yang + 1 : 0;
      int thiz = extraH * h + j * a + k * d;
      ans = min(ans, thiz);
    }
  cout << ans << "\n";
  return 0;
}
