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!float + Y^^2)*2 + 1).to!int); }