You are given a matrix of size n×m. Initally, the matrix contains 0s. There are q queries and you must process them sequentially by performing the following operations:
Your task is to count the remaining number of 1s that are available after the q queries.
Input format
In the sample:
after the first query, the number of '1' is 1
after the second query, the number is 5
after the third query, the number is 4.
So we print 4.