#include <bits/stdc++.h>
using namespace std;
long long powmod(long long a, long long b) {
  long long res = 1;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a;
    a = a * a;
  }
  return res;
}
int N, K;
long long a, b, w, x, C;
int in[2222];
int curMX;
bool check(long long mid) {
  a -= (b + mid * x) / w;
  C -= mid;
  if (C <= a) return 1;
  return 0;
}
long long _a, _b, _w, _x, _C;
int main() {
  cin >> _a >> _b >> _w >> _x >> _C;
  if (_C <= _a) {
    cout << 0 << endl;
    return 0;
  }
  long long low = -1, high = 200000000000001;
  while (low + 1 < high) {
    long long mid = (low + high) / 2;
    a = _a, b = _b, w = _w, x = _x, C = _C;
    b = w - b - 1;
    if (check(mid)) {
      high = mid;
    } else
      low = mid;
  }
  cout << high << endl;
  return 0;
}
