#include <bits/stdc++.h>
using namespace std;
const long long mxmx = 2 * 1e5 + 10, lgn = 20;
long long n, m, d;
pair<long long, long long> a[mxmx];
pair<long long, long long> r[mxmx][lgn], l[mxmx][lgn];
void rmq() {
  for (long long i = 0; i < m; i++) {
    l[i][0] = make_pair(i, a[i].second);
    for (long long j = 1; j < lgn; j++) {
      if (i - (1 << (j - 1)) >= 0)
        l[i][j] = (l[i][j - 1].second < l[i - (1 << (j - 1))][j - 1].second)
                      ? l[i][j - 1]
                      : l[i - (1 << (j - 1))][j - 1];
      else
        l[i][j] = l[i][j - 1];
    }
  }
  for (long long i = m - 1; i >= 0; i--) {
    r[i][0] = make_pair(i, a[i].second);
    for (long long j = 1; j < lgn; j++) {
      if (i + (1 << (j - 1)) < m)
        r[i][j] = (r[i][j - 1].second < r[i + (1 << (j - 1))][j - 1].second)
                      ? r[i][j - 1]
                      : r[i + (1 << (j - 1))][j - 1];
      else
        r[i][j] = r[i][j - 1];
    }
  }
}
pair<long long, long long> MIN(long long i, long long j) {
  return (r[i][(long long)log2(j - i + 1)].second <
          l[j][(long long)log2(j - i + 1)].second)
             ? r[i][(long long)log2(j - i + 1)]
             : l[j][(long long)log2(j - i + 1)];
}
long long solve(long long i, long long j, long long benzin) {
  if (a[j].first - a[i].first <= n) return 0;
  if (j - i == 1) return -1;
  long long m = MIN(i + 1, j - 1).first, price = MIN(i + 1, j - 1).second;
  long long ret = 0, G;
  if (a[m].first - a[i].first <= benzin)
    benzin -= (a[m].first - a[i].first);
  else {
    G = solve(i, m, benzin);
    if (G == -1) return -1;
    ret += G;
    benzin = 0;
  }
  if (a[j].first - a[m].first >= n) {
    ret += (n - benzin) * a[m].second;
    G = solve(m, j, n);
    if (G == -1) return -1;
    ret += G;
  } else {
    ret += (a[j].first - a[m].first - benzin) * a[m].second;
  }
  return ret;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> d >> n >> m;
  for (long long i = 0; i < m; i++) {
    cin >> a[i].first >> a[i].second;
  }
  m += 2;
  a[m - 2] = make_pair(0, 0);
  a[m - 1] = make_pair(d, 0);
  sort(a, a + m);
  cout << endl;
  for (long long i = 0; i < m; i++) {
  }
  rmq();
  cout << solve(0, m - 1, n);
}
