#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long a1, b1, c1, a2, b2, c2, cost1, cost2, cost3;
  cin >> a1 >> b1 >> c1 >> a2 >> b2 >> c2 >> cost1 >> cost2 >> cost3;
  long long ans = 1e18;
  for (long long b_add = 0; b_add <= 200; b_add++) {
    for (long long c_add = 0; c_add <= 200; c_add++) {
      if (b1 + b_add <= c2) {
        continue;
      }
      long long cur_a1 = a1, cur_a2 = a2;
      while (cur_a2 > 0) {
        cur_a1 -= max(0ll, b2 - (c1 + c_add));
        cur_a2 -= b1 + b_add - c2;
      }
      ans = min(ans,
                b_add * cost2 + c_add * cost3 + max(0ll, -cur_a1 + 1) * cost1);
    }
  }
  cout << ans << '\n';
}
