#include <bits/stdc++.h>
using namespace std;
const int N = 2 * 1e5 + 10;
pair<long long, long long> stations[N];
long long d, n, m;
int nxt[N];
bool sol_exist() {
  for (int i = 0; i < m; i++) {
    if (stations[i].first == d) return 1;
    if (i == m - 1) return 1;
    if (stations[i + 1].first - stations[i].first > n) return 0;
  }
  return 0;
}
vector<int> v;
int main() {
  cin >> d >> n >> m;
  for (int i = 1; i <= m; i++) cin >> stations[i].first >> stations[i].second;
  stations[0] = make_pair(0, 1e15);
  stations[m + 1] = make_pair(d, 0);
  m += 2;
  sort(stations, stations + m);
  if (!sol_exist()) {
    cout << -1 << endl;
    return 0;
  }
  v.push_back(m - 1);
  for (int i = m - 2; i >= 0; i--) {
    while (1) {
      if (v.empty()) break;
      if (stations[v[0]].first - stations[i].first > n)
        v.erase(v.begin());
      else
        break;
    }
    long long minv = 1e15;
    int ind = -1;
    while (1) {
      if (v.empty()) break;
      int last = v.size() - 1;
      if (stations[v[last]].second > stations[i].second) {
        if (minv > stations[v[last]].second) {
          minv = stations[v[last]].second;
          ind = v[last];
        }
        v.pop_back();
      } else {
        minv = stations[v[last]].second;
        ind = v[last];
        break;
      }
    }
    nxt[i] = ind;
    v.push_back(i);
  }
  int ind = 0;
  long long res = 0;
  long long have = n;
  while (1) {
    if (stations[ind].first == d) break;
    long long dist = stations[nxt[ind]].first - stations[ind].first;
    if (stations[nxt[ind]].second > stations[ind].second) {
      res += (n - have) * stations[ind].second;
      have = n;
      have -= dist;
    } else if (have < dist) {
      res += (dist - have) * stations[ind].second;
      have = 0;
    } else
      have -= dist;
    ind = nxt[ind];
  }
  cout << res << endl;
  return 0;
}
