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;
const int N = 105000;
const int M = 105;
int n, m, p;
long long hill[N];
long long a[N], s[N];
long long dp[N];
int top, tail;
long long duix[N], duiy[N];
int getint() {
  char e = getchar();
  int res = 0;
  while (e < '0' || e > '9') e = getchar();
  while ('0' <= e && e <= '9') {
    res = (res << 3) + (res << 1) + e - '0';
    e = getchar();
  }
  return res;
}
int main() {
  int i, j;
  n = getint();
  m = getint();
  p = getint();
  for (i = 2; i <= n; i++) hill[i] = getint();
  for (i = 2; i <= n; i++) hill[i] += hill[i - 1];
  for (i = 1; i <= m; i++) {
    a[i] = -hill[getint()];
    a[i] += getint();
  }
  sort(a + 1, a + m + 1);
  for (i = 1; i <= m; i++) s[i] = a[i] + s[i - 1];
  for (i = 1; i <= m; i++) dp[i] = i * a[i];
  for (j = 2; j <= p; j++) {
    top = 1;
    tail = 0;
    for (i = 1; i <= m; i++) {
      long long nowx = i;
      long long nowy = dp[i];
      while (tail >= 2) {
        double xla = duiy[tail] - duiy[tail - 1];
        xla /= duix[tail] - duix[tail - 1];
        double xlb = nowy - duiy[tail - 1];
        xlb /= nowx - duix[tail - 1];
        if (xla - xlb > -1e-10)
          tail--;
        else
          break;
      }
      tail++;
      duix[tail] = nowx;
      duiy[tail] = nowy;
    }
    for (i = 1; i <= m; i++) {
      dp[i] = duiy[top] - a[i] * duix[top];
      while (top < tail && duix[top + 1] <= i) {
        long long now = duiy[top + 1] - a[i] * duix[top + 1];
        if (now <= dp[i]) {
          top++;
          dp[i] = now;
        } else
          break;
      }
      dp[i] += i * a[i];
    }
  }
  printf("%I64d\n", dp[m] - s[m]);
  return 0;
}
