from itertools import accumulate from heapq import * N,M,X = map(int,input().split()) D = {} for _ in range(N): a,b = map(int,input().split()) a = -a-X if b not in D: D[b] = [a] else: heappush(D[b],a) K = int(input()) C = list(map(int,input().split())) imos = [0]*(N+1) for c in C: imos[0] += 1 imos[c] -= 1 ac_imos = list(accumulate(imos)) E = [] for k,v in D.items(): n = heappop(v) heappush(E,(n,k)) ans = 0 for c in ac_imos: if not E: break a,b = heappop(E) ans += -a*c if D[b]: d = heappop(D[b]) d += X heappush(E,(d,b)) print(ans)