#include <bits/stdc++.h>

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int N;
  int64_t D;
  cin >> N >> D;
  vector<int64_t> X(N), V(N);
  for (int i = 0; i < N; i++) {
    cin >> X[i];
  }
  for (int i = 0; i < N; i++) {
    cin >> V[i];
  }
  int64_t tot = 0;
  for (int v : V) {
    tot += v;
  }
  cout << (D + tot - 1) / tot << '\n';
  return 0;
}