#include <cstdio>
#include <algorithm>
#include <vector>
#include <cmath>
#include <iostream>

using namespace std;

const int MAXN = 100000;
long long a[MAXN], b[MAXN];

int main() {
    freopen("delivery.in", "r", stdin);
    freopen("delivery.out", "w", stdout);
    int n, k, t;
	cin >> n >> k >> t;
	for (int i = 0; i < n; i++) {
		cin >> a[i];
	}    
	for (int i = 0; i < n; i++) {
		cin >> b[i];
	}
	long long ans = 0;
	for (int i = 0; i < n; i++) {
		ans += a[i];
		if (ans + k < b[i]) {
			ans += k;
		} else {
			ans = ans + t;
		}
	}
	cout << ans;
    return 0;
}
