#include int main(){ int64_t N, D; std::cin >> N >> D; std::vector x(N), v(N); for(int i = 0; i < N; ++i) std::cin >> x[i]; for(int i = 0; i < N; ++i) std::cin >> v[i]; auto f = [&](int64_t T){ int64_t ret = std::accumulate(v.begin(), v.end(), 0LL) * T; return ret; }; int64_t lb = 0, ub = 1e9; while(std::abs(lb - ub) > 1){ auto mid = (lb + ub) / 2; if(f(mid) >= D){ ub = mid; }else{ lb = mid; } } std::cout << ub << "\n"; return 0; }