LaunchPad
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Hery is a boy with strong practical abilities. Nowadays,he designed a LaunchPad which is not same as what you ever seen.
The LaunchPad is a touch screen divided into squares of N rows and M columns. Each square has two states of light and shade. And all squares are shady initially. When you touch the square in row X and column Y, the state of all the squares in the row and column will change. Now he wants to know how many squares are light on the LaunchPad after he makes multiple touches.

输入描述:

The first line of input contains two integers  denoting the rows and columns of LaunchPad.
The second line of input contains single integer denoting the times of touch.
On the next Q lines,describe X and Y - the position of the square being touched.

输出描述:

Print one line - the number of the squares that is on light state.
示例1

输入

复制
1 1
1
1 1

输出

复制
1
示例2

输入

复制
2 4
2
2 4
1 4

输出

复制
6

说明