Zxr960115 is owner of a large farm. He feeds m cute cats and employs p feeders. There's a straight road across the farm and n hills along the road, numbered from 1 to n from left to right. The distance between hill i and (i - 1) is di meters. The feeders live in hill 1.

One day, the cats went out to play. Cat i went on a trip to hill hi, finished its trip at time ti, and then waited at hill hi for a feeder. The feeders must take all the cats. Each feeder goes straightly from hill 1 to n without waiting at a hill and takes all the waiting cats at each hill away. Feeders walk at a speed of 1 meter per unit time and are strong enough to take as many cats as they want.

For example, suppose we have two hills (d2 = 1) and one cat that finished its trip at time 3 at hill 2 (h1 = 2). Then if the feeder leaves hill 1 at time 2 or at time 3, he can take this cat, but if he leaves hill 1 at time 1 he can't take it. If the feeder leaves hill 1 at time 2, the cat waits him for 0 time units, if the feeder leaves hill 1 at time 3, the cat waits him for 1 time units.

Your task is to schedule the time leaving from hill 1 for each feeder so that the sum of the waiting time of all cats is minimized.

Input

The first line of the input contains three integers n, m, p (2 ≤ n ≤ 105, 1 ≤ m ≤ 105, 1 ≤ p ≤ 100).

The second line contains n - 1 positive integers d2, d3, ..., dn (1 ≤ di < 104).

Each of the next m lines contains two integers hi and ti (1 ≤ hi ≤ n, 0 ≤ ti ≤ 109).

Output

Output an integer, the minimum sum of waiting time of all cats.

Please, do not write the %lld specifier to read or write 64-bit integers in С++. It is preferred to use the cin, cout streams or the %I64d specifier.

Examples

Input

4 6 2
1 3 5
1 0
2 1
4 9
1 10
2 10
3 12


Output

3
#include <bits/stdc++.h>
using namespace std;
struct line {
  long long k, b;
  long double value(long double x) { return k * x + b; }
};
long double intersect(line a, line b) {
  return 1.0L * (b.b - a.b) / (a.k - b.k);
}
struct convex_hull_trick {
  vector<line> lines;
  vector<long double> pts = {-1e9};
  convex_hull_trick() {}
  void add(line l) {
    if (lines.empty()) {
      lines.push_back(l);
      return;
    }
    while (lines.size() > 1 &&
           l.value(pts.back()) < lines.back().value(pts.back())) {
      lines.pop_back();
      pts.pop_back();
    }
    pts.push_back(intersect(l, lines.back()));
    lines.push_back(l);
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m, p;
  cin >> n >> m >> p;
  vector<long long> d(n - 1);
  for (int i = 0; i < (int)(n - 1); i++) cin >> d[i];
  vector<long long> h(m), t(m);
  for (int i = 0; i < (int)(m); i++) cin >> h[i] >> t[i];
  vector<long long> D(n);
  for (int i = 0; i < (int)(n - 1); i++) {
    D[i + 1] = D[i] + d[i];
  }
  vector<long long> S(m);
  for (int i = 0; i < (int)(m); i++) {
    S[i] = t[i] - D[h[i] - 1];
  }
  vector<int> ind(m);
  iota(ind.begin(), ind.end(), 0);
  sort(ind.begin(), ind.end(), [&S](int i, int j) { return S[i] < S[j]; });
  vector<long long> Ss(m + 1);
  for (int i = 0; i < (int)(m); i++) {
    Ss[i + 1] = Ss[i] + S[ind[i]];
  }
  for (int i = 0; i < (int)(m); i++) {
    cerr << S[ind[i]] << " ";
  }
  cerr << endl;
  vector<long long> dp(m);
  for (int ip = 0; ip < (int)(m); ip++) {
    int i = ind[ip];
    dp[ip] = (ip + 1) * S[i] - Ss[ip + 1];
  }
  for (int ip = 0; ip < (int)(m); ip++) cerr << dp[ip] << " ";
  cerr << endl;
  for (int q = (int)(2); q < (int)(p + 1); q++) {
    convex_hull_trick cht;
    int j = 0;
    for (int ip = 0; ip < (int)(m); ip++) {
      int i = ind[ip];
      cht.add({-(ip + 1), Ss[ip + 1] + dp[ip]});
      if (ip > 0) {
        j = min<int>(j, cht.pts.size() - 1);
        while (j < (int)cht.pts.size() - 1 && cht.pts[j + 1] < S[i]) {
          j++;
        }
        dp[ip] = min<long long>(
            dp[ip], S[i] * (ip + 1) - Ss[ip + 1] + cht.lines[j].value(S[i]));
      }
    }
  }
  cout << dp[m - 1] << endl;
  return 0;
}
