#include <bits/stdc++.h>
using namespace std;
int main() {
  int ans = 1e9;
  int a, b, c;
  int a1, b1, c1;
  int a2, b2, c2;
  scanf("%d%d%d", &a1, &b1, &c1);
  scanf("%d%d%d", &a2, &b2, &c2);
  scanf("%d%d%d", &a, &b, &c);
  for (int i = 0; i <= 1000; i++)
    for (int j = 0; j <= 200; j++)
      for (int k = 0; k <= 100; k++) {
        int tmp1 = a1 + i;
        int tmp2 = b1 + j;
        int tmp3 = c1 + k;
        if (tmp2 <= c2) break;
        int t = (a2 + tmp2 - c2 - 1) / (tmp2 - c2);
        tmp1 -= t * (b2 - tmp3);
        if (tmp1 > 0) {
          ans = min(ans, a * i + b * j + c * k);
          break;
        }
      }
  printf("%d\n", ans);
  return 0;
}
