#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, w, x, init, last, target, mid, atime;
  scanf("%lld %lld %lld %lld %lld", &a, &b, &w, &x, &c);
  if (c <= a)
    printf("0\n");
  else {
    init = 0;
    last = 400000000000000LL;
    while (init <= last) {
      mid = init + (last - init) / 2;
      atime = b - (mid * x);
      if (atime < 0) {
        atime = (long long)ceil((double)abs(atime) / w);
      }
      if ((c - mid) <= (a - atime)) {
        target = mid;
        last = mid - 1;
      } else
        init = mid + 1;
    }
    printf("%lld\n", target);
  }
  return 0;
}
