#include <bits/stdc++.h>
using namespace std;

#ifdef LOCAL
#include "debug.h"
#else
#define DEBUG(...)
#endif

int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  int n, d;
  cin >> n >> d;
  vector<int> x(n);
  for (auto&& e : x) cin >> e;
  vector<int> v(n);
  for (auto&& e : v) cin >> e;
  using ll = long long;
  ll s = accumulate(begin(v), end(v), 0LL);
  cout << (d + s - 1) / s << '\n';
}