#include using namespace std; #define fs first #define sc second #define pb push_back #define mp make_pair #define eb emplace_back #define ALL(A) A.begin(),A.end() #define RALL(A) A.rbegin(),A.rend() typedef long long LL; typedef pair P; const LL mod=1000000007; const LL LINF=1LL<<60; const int INF=1<<30; int dx[]={1,0,-1,0}; int dy[]={0,1,0,-1}; int main(){ int n;cin >> n; vector a(n+1),b(n+1),d(n); for (int i = 0; i < n+1; i++) { cin >> a[i]; } for (int i = 0; i < n+1; i++) { cin >> b[i]; } for (int i = 0; i < n; i++) { cin >> d[i]; } sort(RALL(d)); int ia=0,ib=0,id=0; int ans = 0; while(true){ if(a[ia] - a[ia+1] > b[ib] - b[ib+1]) ib++; else ia++; while(id < n && a[ia] + b[ib] < d[id]) id++; if(id >= n){ cout << ans << endl; return 0; } else{ ans++; id++; } } return 0; }