#include <bits/stdc++.h>
using namespace std;
long long a, b, w, x, c;
long long count_a_ver(long long time) {
  long long bb = 0, count = 0;
  for (int i = 0; i < time; i++) {
    if (bb >= x) {
      bb -= x;
    } else {
      count++;
      bb += (w - x);
    }
  }
  return count;
}
int main() {
  cin >> a >> b >> w >> x >> c;
  if (c <= a) {
    cout << "0";
    return 0;
  }
  long long low = 0, high = 1e13;
  while (low + 1 < high) {
    long long mid = (low + high) / 2;
    long long cval = c - mid;
    long long bend = (b - mid * x);
    long long aval = a + (bend - w + 1) / w;
    if (cval <= aval) {
      high = mid;
    } else {
      low = mid;
    }
  }
  cout << high;
  return 0;
}
