#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
long long a, b, w, x, c;
void solve() {
  long long L = 0;
  long long R = 1000000000LL * 1000000000LL;
  while (L < R) {
    long long M = (L + R) / 2;
    long long t = x * M - b;
    long long v;
    if (t <= 0) {
      v = 0;
    } else {
      v = (t + w - 1) / w;
    }
    if (c - M <= a - v) {
      R = M;
    } else {
      L = M + 1;
    }
  }
  cout << L << endl;
}
int main() {
  while (cin >> a >> b >> w >> x >> c) {
    solve();
  }
}
