#include <bits/stdc++.h>
using namespace std;
ifstream fin("Sisend.txt");
int hy, ay, dy, hm, am, dm, h, a, d;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cerr.tie(0);
  cin >> hy >> ay >> dy >> hm >> am >> dm >> h >> a >> d;
  int vas = 1e9;
  for (int(k) = (0); ((k)) < ((101)); ((k))++)
    for (int(i) = (0); ((i)) < ((10005)); ((i))++)
      for (int(j) = (0); ((j)) < ((10005)); ((j))++) {
        int hyy = hy + i, ayy = ay + j, dyy = dy + k;
        int vy = am - dyy, vm = ayy - dm;
        if ((vy <= 0 and vm > 0) or
            (vy > 0 and vm > 0 and
             ((hyy - 1) / (am - dyy) >= (hm - 1) / (ayy - dm) + 1))) {
          vas = min(vas, i * h + j * a + k * d);
          break;
        }
      }
  cout << vas;
}
