import sys
d, b, g, n = map(int, input().split())
tank = b
visit = 0
for k in range(n, 0, -1):
    if tank < g or b < d-g:
        print("NIE")
        sys.exit(0)
    elif tank >= d + ((d-g) if k>1 else 0):
        tank -= d
    else:
        visit += 1
        tank = b - (d-g)
    g = d-g
print(visit)
