#include using namespace std; typedef long long ll; typedef pair P; #define REP(i,n) for(int i=0;i> N >> M1; s[0]=1; int x=0; REP(i,M1){ int a; cin >> a; x+=a; s[x]=1; } cin >> M2; x=N; REP(i,M2){ int a; cin >> a; x-=a; s[x]=1; } int ans=0; REP(i,N+1) if(s[i]==0) ans++; cout << ans <