#include <bits/stdc++.h>
using namespace std;
long long int a, b, w, x, c;
int state(long long int days) {
  long long int decr1, decr2;
  decr1 = (w - b + (days)*x) / w;
  if ((b - x * days) >= 0)
    decr1 = 0;
  else if ((w - b + days * x) % w == 0)
    decr1--;
  decr2 = (days);
  if ((c - decr2) <= (a - decr1)) return 1;
  return -1;
}
long long int find() {
  if (c <= a) return 0;
  long long int lo = 1, hi = 10000000000000, m;
  while (lo < hi) {
    m = (lo + hi) / 2;
    if (state(m) < 0)
      lo = m + 1;
    else
      hi = m;
  }
  return hi;
}
int main() {
  cin >> a >> b >> w >> x >> c;
  cout << find() << endl;
  return 0;
}
