import std.stdio; import std.conv; import std.string; import std.math; void main() { immutable x = readln.chomp.to!int; immutable y = readln.chomp.to!int; immutable l = readln.chomp.to!int; int step = abs(x) / l + (x % l != 0) + abs(y) / l + (y % l != 0); if (y < 0) { step += 2; } else if (x != 0) { ++step; } writeln(step); }