#include <bits/stdc++.h>
using namespace std;
int main() {
  long long d, n, m;
  cin >> d >> n >> m;
  vector<pair<long long, long long> > xp(m + 2);
  for (long long i = 1; i < m + 1; i++) cin >> xp[i].first >> xp[i].second;
  xp[m + 1].first = d;
  xp[m + 1].second = 0;
  xp[0].second = 1e18;
  sort(xp.begin(), xp.end());
  vector<long long> next(m + 2);
  stack<long long> st;
  for (long long i = 0; i < m + 1; i++) {
    while (!st.empty()) {
      long long x = st.top();
      if (xp[x].second > xp[i].second) {
        st.pop();
      } else
        break;
      next[x] = i;
    }
    st.push(i);
  }
  while (!st.empty()) {
    next[st.top()] = -1;
    st.pop();
  }
  long long now = n;
  long long ans = 0;
  for (long long i = 0; i < m + 2; i++) {
    if (now < 0) {
      cout << "-1" << endl;
      return 0;
    }
    long long nxt = next[i], add;
    if (next[i] == -1)
      add = (d - xp[i].first);
    else
      add = xp[next[i]].first - xp[i].first;
    if (add > n) add = n;
    if (add > now) {
      ans += (add - now) * xp[i].second;
      now = add;
    }
    now -= (xp[i + 1].first - xp[i].first);
  }
  cout << ans << endl;
}
