#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define rep(i, n) for(int(i) = 0; (i) < (n); (i)++) #define FOR(i, m, n) for(int(i) = (m); (i) < (n); (i)++) #define All(v) (v).begin(), (v).end() #define pb push_back #define MP(a, b) make_pair((a), (b)) using ll = long long; using pii = pair; using pll = pair; const int INF = 1 << 30; const ll LINF = 1LL << 60; const int MOD = 1e9 + 7; int main() { ll N, D; cin >> N >> D; vector X(N), V(N); rep(i, N) { cin >> X[i]; } ll v = 0; rep(i, N) { cin >> V[i]; v += V[i]; } ll ub = 1e9, lb = 0; while(ub - lb > 1) { ll mid = (ub + lb) / 2; if(mid * v >= D) { ub = mid; } else { lb = mid; } } cout << ub << endl; return 0; }