#include <bits/stdc++.h>
double const EPS = 3e-8;
using namespace std;
const long long INF = 1e12 + 10;
template <class T>
T gcd(T a, T b) {
  return (b != 0 ? gcd<T>(b, a % b) : a);
}
template <class T>
T lcm(T a, T b) {
  return (a / gcd<T>(a, b) * b);
}
template <class T>
inline bool read(T &x) {
  int c = getchar();
  int sgn = 1;
  while (~c && c < '0' || c > '9') {
    if (c == '-') sgn = -1;
    c = getchar();
  }
  for (x = 0; ~c && '0' <= c && c <= '9'; c = getchar()) x = x * 10 + c - '0';
  x *= sgn;
  return ~c;
}
int Y[10], M[10], P[10];
bool can(int y, int m, int a, int d) {
  int lagbeA = (M[0] + (a - M[2]) - 1) / (a - M[2]);
  int lagbeB = (Y[0] + (M[1] - d) - 1) / (M[1] - d);
  return lagbeA > lagbeA;
}
int main() {
  Y[0] = ({
    int a;
    read(a);
    a;
  }),
  Y[1] = ({
    int a;
    read(a);
    a;
  }),
  Y[2] = ({
    int a;
    read(a);
    a;
  });
  M[0] = ({
    int a;
    read(a);
    a;
  }),
  M[1] = ({
    int a;
    read(a);
    a;
  }),
  M[2] = ({
    int a;
    read(a);
    a;
  });
  P[0] = ({
    int a;
    read(a);
    a;
  }),
  P[1] = ({
    int a;
    read(a);
    a;
  }),
  P[2] = ({
    int a;
    read(a);
    a;
  });
  long long cost = 0;
  long long ans = INF;
  for (int atk = 0; atk <= 1000; atk++) {
    for (int dif = 0; dif <= 1000; dif++) {
      long long cost = atk * P[1] + dif * P[2];
      if (Y[1] + atk <= M[2]) continue;
      int killMon = (M[0] / (Y[1] + atk - M[2]));
      if (M[0] % (Y[1] + atk - M[2])) killMon++;
      int los = M[1] - dif - Y[2];
      if (los < 0) los = 0;
      int need = 1 + killMon * los;
      if (need > Y[0]) cost += (need - Y[0]) * P[0];
      ans = min(ans, cost);
    }
  }
  printf("%I64d\n", ans);
  return 0;
}
