#include <bits/stdc++.h>
using namespace std;
int main() {
  int k = 1 << 30;
  int yh, ya, yd;
  cin >> yh >> ya >> yd;
  int mh, ma, md;
  cin >> mh >> ma >> md;
  int h, a, d;
  cin >> h >> a >> d;
  for (int x = 0; x <= 200; x++)
    for (int y = 0; y <= 200; y++) {
      if (ya + x <= md) continue;
      int b = (mh + ya + x - md - 1) / (ya + x - md);
      int c = max(0, b * (ma - yd - y) - yh + 1);
      k = min(k, x * a + y * d + c * h);
    }
  cout << k;
}
