#include <bits/stdc++.h>
using namespace std;
long long t;
int a, b, w, x, c;
bool judge(long long tt) {
  long long tc;
  tc = c - tt;
  long long m;
  m = b - tt * x;
  long long ta;
  ta = a;
  if (m < 0) ta -= (-m + w - 1) / w;
  return tc <= ta;
}
int main() {
  scanf("%d%d%d%d%d", &a, &b, &w, &x, &c);
  if (c <= a) {
    puts("0");
    return 0;
  }
  long long l = 1, r = 1e18;
  while (l + 1 < r) {
    long long mid = (l + r) >> 1;
    if (judge(mid))
      r = mid;
    else
      l = mid;
  }
  printf("%I64d", r);
  return 0;
}
