{
TASK:SIENAJ
LANG:PASCAL
}
program siena;
var f: text;
    p, a, n, plotas, x1, y1, x2, y2, i: longint;
begin
    assign(f, 'SIENA.IN');
    reset(f);
    readln(f, p, a);
    readln(f, n);
    plotas := p*a;
    for i := 1 to n do begin
        readln(f, x1, y1, x2, y2);
        plotas := plotas - (x2-x1)*(y2-y1);
    end;
    close(f);
    assign(f, 'SIENA.OUT');
    rewrite(f);
    writeln(f, plotas);
    close(f);
end.
