#include using namespace std; #define all(x) x.begin(),x.end() #define rep(i, n) for (int i = 0; i < (int)(n); i++) template inline bool chmax(T&a,T b){if(a inline bool chmin(T&a,T b){if(a>b){a=b;return 1;}return 0;} using ll = long long; ll n,d,sum; ll x[1000005],v[100005]; int main () { ios::sync_with_stdio(false); cin.tie(0); cin >> n >> d; rep(i,n) cin >> x[i]; rep(i,n) cin >> v[i], sum+=v[i]; cout << (d+sum-1)/sum << endl; }