#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, w, x;
  cin >> a >> b >> w >> x >> c;
  if (c <= a) {
    printf("0\n");
    return 0;
  } else {
    long long l = 0, r = 200000000000000LL, res = 0;
    while (l <= r) {
      long long m = (l + r) / 2;
      long long q = b - x * m;
      if (q < 0) {
        q = abs(q);
        long long bonus = 0;
        q = ceil((double)q / w);
      }
      if ((c - m) <= (a - q)) {
        res = m;
        r = m - 1;
      } else
        l = m + 1;
    }
    cout << res << endl;
  }
  return 0;
}
