from math import ceil def abs_ceil(l): def _(n): return abs(ceil(n / l)) return _ X,Y,L = map(int,[input() for x in range(3)]) command = 0 abceil = abs_ceil(L) if Y < 0: command+=2 elif X: command+=1 command+=abceil(X) + abceil(Y) print(command)