{$N+}
var n,x:longint; y:double;
begin
readln(n);
x:=n+1;
y:=sqr(sqrt(x)-sqrt(n));
while abs(int(y)-y)>1e-6 do
begin
inc(x);
y:=sqr(sqrt(x)-sqrt(n));
end;
writeln(x);
end.
{$N+}
var n,x:longint; y:double;
begin
readln(n);
x:=n+1;
y:=sqr(sqrt(x)-sqrt(n));
while abs(int(y)-y)>1e-6 do
begin
inc(x);
y:=sqr(sqrt(x)-sqrt(n));
end;
writeln(x);
end.