import std.algorithm, std.array, std.range; import std.string, std.conv; import std.math; import std.stdio, std.typecons; void main() { auto rd = readln.split.map!(to!int); auto xp = rd[0]; auto yp = rd[1]; auto r = sqrt((xp ^^ 2 + yp ^^ 2).to!real).to!int; if (r ^^2 == xp ^^2 + yp ^^2) r = r * 2 + 1; else r = (r + 1) * 2; writeln(r); }