#include <bits/stdc++.h>
template <typename T>
T Abs(T a) {
  return (a < 0 ? -a : a);
}
template <typename T>
T MAX(T a, T b) {
  return (a > b ? a : b);
}
template <typename T>
T MIN(T a, T b) {
  return (a < b ? a : b);
}
template <typename T>
T GCD(T a, T b) {
  if (b == 0) return a;
  return GCD(b, a % b);
}
template <typename T>
inline void read(T &x) {
  T f = 1;
  char c;
  x = 0;
  for (c = getchar(); c < '0' || c > '9'; c = getchar())
    if (c == '-') f = -1;
  for (; c >= '0' && c <= '9'; c = getchar()) x = x * 10 + c - '0';
  x *= f;
}
using fl = float;
using db = double;
using ll = long long;
using ull = unsigned long long;
const int mx = 1000005;
const int inf = 99999999;
const int intlim = 2147483648;
const db PI = acos(-1);
using namespace std;
int main() {
  ll a, b, w, x, c;
  scanf("%lld %lld %lld %lld %lld", &a, &b, &w, &x, &c);
  if (c <= a) {
    printf("0\n");
    return 0;
  }
  ll beg = 0, end = 2e15, mid, ans = 0;
  ;
  while (beg + 1 < end) {
    mid = (beg + end) / 2;
    ans = b + w * (mid - c + a) - (mid - 1) * x;
    (ans >= x) ? end = mid : beg = mid;
  }
  cout << MAX(c - a, end) << endl;
  return 0;
}
