#include <bits/stdc++.h>
using namespace std;
long long a, b, w, x, c;
bool judge(long long t) {
  if (b - x * t >= 0) return c - t <= a;
  return c - t <= a - ((x * t - b) / w + ((x * t - b) % w != 0));
}
int main() {
  while (cin >> a >> b >> w >> x >> c) {
    if (c <= a) {
      cout << 0 << endl;
      break;
    }
    long long l = 1;
    long long r = (long long)1 << 60;
    while (l + 3 < r) {
      long long mid = (l + r) >> 1;
      if (judge(mid))
        r = mid;
      else
        l = mid;
    }
    for (long long i = l; i <= r; i++)
      if (judge(i)) {
        cout << i << endl;
        break;
      }
  }
  return 0;
}
