#include <bits/stdc++.h>
using namespace std;
long long a, b, w, x, c;
long long t;
int main() {
  while (cin >> a >> b >> w >> x >> c) {
    t = 0;
    c -= a;
    a = 0;
    w -= x;
    if (c > 0) {
      if (b >= x) t += b / x, c -= b / x, b %= x;
      if (c > 0) t += (x * c - b + w - 1) / w + c;
    }
    cout << t << endl;
  }
}
