#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, w, x, c;
  scanf("%lld%lld%lld%lld%lld", &a, &b, &w, &x, &c);
  if (c <= a)
    printf("0\n");
  else {
    long long p1 = (c - a - b / x) * x - b % x;
    long long p2 = w - x;
    long long p;
    if (p1 % p2 == 0)
      p = p1 / p2;
    else
      p = p1 / p2 + 1;
    printf("%lld\n", p + c - a);
  }
  return 0;
}
