#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const int N = 200001;
int d, n, m;
pair<int, int> g[N];
stack<int> st;
int nxt[N];
int main() {
  scanf("%d%d%d", &d, &n, &m);
  g[0].first = 0;
  g[0].second = 0;
  for (int i = 1; i <= m; ++i) scanf("%d%d", &g[i].first, &g[i].second);
  g[m + 1].first = d;
  g[m + 1].second = 0;
  sort(g, g + m + 2);
  for (int i = m; i >= 0; --i) {
    while (st.empty() == false && g[st.top()].second > g[i].second) st.pop();
    if (st.empty())
      nxt[i] = -1;
    else
      nxt[i] = st.top();
    st.push(i);
  }
  int l = 0;
  int cnt = n;
  long long ans = 0;
  long long res = INF;
  while (l <= m) {
    if (d - g[l].first <= n) {
      int need = max(0, d - g[l].first - cnt);
      res = min(res, ans + 1ll * need * g[l].second);
    }
    if (g[l + 1].first - g[l].first > n) {
      printf("-1\n");
      return 0;
    }
    if (nxt[l] == -1 || g[nxt[l]].first - g[l].first > n) {
      ans += 1ll * (n - cnt) * g[l].second;
      cnt = n;
      cnt -= (g[l + 1].first - g[l].first);
      l++;
    } else {
      int need = max(0, g[nxt[l]].first - g[l].first - cnt);
      ans += 1ll * need * g[l].second;
      cnt += need;
      cnt -= (g[nxt[l]].first - g[l].first);
      l = nxt[l];
    }
  }
  printf("%I64d\n", res);
  return 0;
}
