import std.stdio, std.conv, std.string, std.range, std.array, std.algorithm, std.math; int main(){ auto X = readln.strip.to!int; auto Y = readln.strip.to!int; auto L = readln.strip.to!int; if(Y>=0){ if(X==0){ num(Y,L).writeln; }else{ (num(Y,L)+1+num(X,L)).writeln; } }else{ (1+num(X,L)+1+num(Y,L)).writeln; } return 0; } int num(int n, int L){ n=abs(n); return n==0 ? 0 : (n/L).to!int + (n%L == 0 ? 0 : 1); }