#include <bits/stdc++.h>
int main(void) {
  int w, h, n, i, s, m, r, e, t, u, x1, x2, y1, y2, a1, a2;
  scanf("%d", &w);
  scanf("%d", &h);
  scanf("%d", &n);
  scanf("%d", &x1);
  scanf("%d", &y1);
  scanf("%d", &a1);
  scanf("%d", &x2);
  scanf("%d", &y2);
  scanf("%d", &a2);
  1 <= i <= n;
  0 <= x1, x2 <= w;
  0 <= y1, y2 <= h;
  1 <= w, h <= 100;
  if (x1 < a1) {
    s = x1 * h;
  }
  if (x1 > a1) {
    s = (w - x1) * h;
  }
  if (x2 < a2) {
    e = y2 * w;
  }
  if (x2 > a2) {
    e = (h - y2) * y2;
  }
  if (x1 < a1 || x2 < a2) {
    t = (e - (w - a1) * h);
    r = t + s;
    u = (w * h) - r;
  }
  printf("%d\n", u);
  return 0;
}
