#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, w, x, c;
  cin >> a >> b >> w >> x >> c;
  long long J = c - a;
  if (J <= 0) {
    cout << 0 << endl;
    return 0;
  }
  b -= (J - 1) * x;
  long long I = ceil(double(x - b) / (w - x));
  cout << I + J << endl;
  return 0;
}
