#include using namespace std; using i32 = int; using i64 = long long; using i128 = __int128_t; using f64 = double; using p2 = pair; using p3 = tuple; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(18); _main(); } void _main() { i64 n; cin >> n; i64 ans = 0; i64 now = -1e18; vector t(n), s(n); for (i64 i = 0; i < n; i++) cin >> t[i]; for (i64 i = 0; i < n; i++) cin >> s[i]; for (i64 i = 0; i < n; i++) { if (s[i] < now) continue; ans++; now = t[i] + s[i]; } cout << ans << "\n"; }