import math X = int(input()) Y = int(input()) L = int(input()) action = 0 #rotation if Y < 0: action += 2 elif X != 0: action += 1 print("rot:", action) #advance action += math.ceil(abs(X)/L) +math.ceil(abs(Y)/L) print("ceil(Y/L)", math.ceil(Y/L)) print(action)