#include <bits/stdc++.h>
using namespace std;
long long a, b, c, w, x, st, mij, dr, A, B, val, sol;
long long cb(long long A) {
  long long st = 0, dr = (1LL << 50);
  long long sol = (1LL << 50);
  while (st <= dr) {
    long long mij = (st + dr) >> 1;
    if (A + mij * w >= x) {
      sol = mij;
      dr = mij - 1;
    } else
      st = mij + 1;
  }
  return sol;
}
int main() {
  cin >> a >> b >> w >> x >> c;
  st = 1;
  dr = (1LL << 50);
  sol = (1LL << 50);
  if (c <= a) sol = 0;
  if (sol)
    while (st <= dr) {
      mij = (st + dr) >> 1;
      A = c - mij;
      B = b - (mij - 1) * x;
      val = cb(B);
      B = a - val;
      if (A <= B && mij <= sol) {
        sol = mij;
        dr = mij - 1;
      } else
        st = mij + 1;
    }
  cout << sol;
}
