import std.stdio, std.conv, std.math, std.string, std.range, std.array, std.algorithm; void main(){ auto buf = readln().strip().split().map!(to!int)(); immutable X = buf[0]; immutable Y = buf[1]; writeln((sqrt(X^^2.to!double + Y^^2 + 1e-5)*2 + 1).to!int); }