#include using namespace std; typedef long long ll; typedef pair l_l; typedef pair i_i; template inline bool chmax(T &a, T b) { if(a < b) { a = b; return true; } return false; } template inline bool chmin(T &a, T b) { if(a > b) { a = b; return true; } return false; } const long long INF = 1e18; //const ll mod = 1000000007; int main() { cin.tie(0); ios::sync_with_stdio(false); ll N, D; cin >> N >> D; ll sum = 0; for(int i = 0; i < N; i++) { ll x; cin >> x; } for(int i = 0; i < N; i++) { ll v; cin >> v; sum += v; } ll ans = (D + sum - 1) / sum; cout << ans << endl; return 0; }