#include <bits/stdc++.h>
using namespace std;
int main() {
  int d, b, g, n;
  cin >> d >> b >> g >> n;
  int tank = b, visit{ };
  for(int k=n; k>=1; k--) {
    if((tank < g) || (b < d-g)) {
      cout << "NIE\n";
      return 0;
    }
    else if(tank >= d + ((k>1)? d-g : 0))
      tank -= d;
    else {
      visit++;
      tank = b - (d-g);
    }
    g = d-g;
  }
  cout << visit << '\n';
  return 0;
}
