package main import . "fmt" import . "os" import bf "bufio" func main() { rd:=bf.NewReader(Stdin) var n int Fscan(rd,&n) f:=make([]bool,n+1) var p,m int Fscan(rd,&m) for ;m>0;m-- { var a int Fscan(rd,&a) p+=a f[p]=true } Fscan(rd,&m) for ;m>0;m-- { var b int Fscan(rd,&b) p-=b f[p]=true } var c int for _,x:=range f { if !x { c++ } } Println(c) }