#include <bits/stdc++.h>
using namespace std;
const int N_MAX = 200002;
const int M_MAX = 200002;
const int INF = 1000000;
struct Point {
  int x, y;
};
bool operator<(const Point &a, const Point &b) {
  return make_pair(a.x, a.y) < make_pair(b.x, b.y);
}
int n, m, k;
set<Point> s;
long long f(Point p) { return abs(p.x - k) + p.y; }
struct Update {
  Point p;
  bool type;
  int index;
  int normPos;
};
bool operator<(const Update &a, const Update &b) { return a.index < b.index; }
bool cmpVal(const Update &a, const Update &b) {
  return make_pair(f(a.p), a.p) < make_pair(f(b.p), b.p);
}
Update updates[M_MAX];
struct SGTNode {
  long long maxVal;
  long long lazy;
};
SGTNode SGT[M_MAX * 4];
void SGTSplit(int node) {
  int lSon = (node << 1), rSon = (lSon | 1);
  SGT[lSon].maxVal += SGT[node].lazy;
  SGT[rSon].maxVal += SGT[node].lazy;
  SGT[lSon].lazy += SGT[node].lazy;
  SGT[rSon].lazy += SGT[node].lazy;
  SGT[node].lazy = 0;
}
void SGTUpdateAdd(int node, int l, int r, int ul, int ur, long long uval) {
  if (ul <= l && r <= ur) {
    SGT[node].maxVal += uval;
    SGT[node].lazy += uval;
    return;
  }
  SGTSplit(node);
  int mid = ((l + r) >> 1), lSon = (node << 1), rSon = (lSon | 1);
  if (ul <= mid) SGTUpdateAdd(lSon, l, mid, ul, ur, uval);
  if (mid + 1 <= ur) SGTUpdateAdd(rSon, mid + 1, r, ul, ur, uval);
  SGT[node].maxVal = max(SGT[lSon].maxVal, SGT[rSon].maxVal);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k >> m;
  for (int i = 1; i <= m; i++) {
    Point p;
    cin >> p.x >> p.y;
    if (s.find(p) != s.end()) {
      updates[i] = Update{p, 0, i, 0};
      s.erase(p);
    } else {
      updates[i] = Update{p, 1, i, 0};
      s.insert(p);
    }
  }
  sort(updates + 1, updates + m + 1, cmpVal);
  for (int i = 1; i <= m; i++)
    updates[i].normPos =
        updates[i - 1].normPos + (i == 1 || cmpVal(updates[i - 1], updates[i]));
  sort(updates + 1, updates + m + 1);
  for (int i = 1; i <= 4 * m; i++) {
    SGT[i].maxVal = -INF - 1;
    SGT[i].lazy = 0;
  }
  int k = 0;
  for (int i = 1; i <= m; i++) {
    if (updates[i].type == 1) {
      SGTUpdateAdd(1, 1, m, updates[i].normPos, updates[i].normPos,
                   INF + f(updates[i].p));
      if (updates[i].normPos < m)
        SGTUpdateAdd(1, 1, m, updates[i].normPos + 1, m, -1);
      k++;
    } else {
      SGTUpdateAdd(1, 1, m, updates[i].normPos, updates[i].normPos,
                   -(INF + f(updates[i].p)));
      if (updates[i].normPos < m)
        SGTUpdateAdd(1, 1, m, updates[i].normPos + 1, m, +1);
      k--;
    }
    cout << max(0LL, SGT[1].maxVal + k - n) << "\n";
  }
  return 0;
}
