import extensions;
import system'math;
public program()
{
var n := 1;
until(n.sqr().mod(1000000) == 269696)
n += 1
};
Console.printLine(n)
}