#include <bits/stdc++.h>
using namespace std;
int X[65536 + 5];
int a, b, w, x, c, ans = 0;
long long binarysearch(long long k, long long l) {
  long long m = (k + l) / 2;
  if (a - (k * x - b + w - 1) / w == c - k) return k;
  if (a - ((k + 1) * x - b + w - 1) / w == c - k - 1) return k + 1;
  if (a - (m * x - b + w - 1) / w >= c - m)
    return binarysearch(k, m);
  else
    return binarysearch(m, l);
}
int main() {
  cin >> a >> b >> w >> x >> c;
  cout << binarysearch(0, 9223372036854775807);
  return 0;
}
