
function Main(input) {
    input = input.trim();
    input = input.split("\n")
    input = input.map(e=>e.split(" ").map(f=>parseInt(f)))

    var sunuke = []

    input.forEach((e,i)=>{        
        if(i!=0 && i%2==0){            
            e.forEach(f=>{                
                sunuke.push(f)
            })
        }   
    })

    var b = sunuke.filter(function (x, i, self) {
        return self.indexOf(x) === i;
    });

    console.log(input[0][0]-b.length)

}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
