#include using namespace std; #define ll long long #define FOR(i,l,r) for(ll i=(l);i<(r);++i) #define REP(i,n) FOR(i,0,n) template T Roundup_div(T x, T y) {return (x+(y-1))/y;} int main(){ ll n, d; cin >> n >> d; ll sum = 0; vector x(n); REP(i, n) cin >> x[i]; vector y = x; sort(y.begin(),y.end()); assert(x == y); REP(i, n - 1) assert(y[i] != y[i+1]); REP(i, n){ ll a; cin >> a; assert(a >= 1 and a <= 1e9); sum += a; } cout << Roundup_div(d, sum) << '\n'; }