#pragma once #include #define M_PI 3.14159265358979323846 // pi using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector VI; typedef pair P; typedef tuple t3; #define rep(a,n) for(int a = 0;a < n;a++) #define repi(a,b,n) for(int a = b;a < n;a++) const ull mod = 1000000007; int main(void) { ll n; cin >> n; vector as(n+1); vector bs(n+1); vector ds(n); rep(i, n + 1) cin >> as[i]; rep(i, n + 1) cin >> bs[i]; rep(i, n) cin >> ds[i]; vector p(n); int a = 0; int b = 0; rep(i, n) { if (as[a + 1] + bs[b] < as[a] + bs[b + 1]) { b++; } else { a++; } p[i] = as[a] + bs[b]; } int sum = 0; rep(i, n) { if (p[i] >= ds[i]) { sum++; } } cout << sum << endl; return 0; }