#include <bits/stdc++.h>
using namespace std;
int main() {
  int mHP, mATK, mDEF;
  int yHP, yATK, yDEF;
  int h, a, d;
  int m_hp, y_hp, cost, times, y_hp_need, ans = 2147483647;
  scanf("%d %d %d", &yHP, &yATK, &yDEF);
  scanf("%d %d %d", &mHP, &mATK, &mDEF);
  scanf("%d %d %d", &h, &a, &d);
  for (int i = max(yATK, mDEF + 1); i <= 200; i++) {
    for (int j = yDEF; j <= 200; j++) {
      m_hp = i - mDEF;
      y_hp = mATK - j;
      times = ceil(mHP * 1.0 / m_hp);
      y_hp_need = times * y_hp;
      cost = max(y_hp_need - yHP + 1, 0) * h + (i - yATK) * a + (j - yDEF) * d;
      ans = min(ans, cost);
    }
  }
  printf("%d\n", ans);
}
