h,w,q=gets.split.map(&:to_i) l=[h+1]*w a=h*w q.times do y,x=gets.split.map(&:to_i) if l[x-1]>y a-=l[x-1]-y l[x-1]=y end puts a end