import java.util.*;
import java.lang.*;
import java.io.*;
class Ideone
{
public static void main
(String[] args
) {
double x,e; //описание переменных
Scanner sc
= new Scanner
(System.
in); x = sc.nextDouble(); //ввод условий
e = sc.nextDouble();
double y1;
int i=0;
double y2=x; //задаем начальное приближение
do
{
y1=y2;
y2=0.5*(y1+x/y1); //вычисление по заданной формуле
i=i+1; //подсчет количества итераций
} while(Math.
abs(y2
-y1
)>=e
); System.
out.
printf("%e\n",
Math.
abs(Math.
sqrt(x
)-y2
)); //сравнение с результатом встроенной функции }
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgpjbGFzcyBJZGVvbmUKewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIAoJewoJCWRvdWJsZSB4LGU7IC8v0L7Qv9C40YHQsNC90LjQtSDQv9C10YDQtdC80LXQvdC90YvRhSAKCQlTY2FubmVyIHNjID0gbmV3IFNjYW5uZXIoU3lzdGVtLmluKTsKCQl4ID0gc2MubmV4dERvdWJsZSgpOyAvL9Cy0LLQvtC0INGD0YHQu9C+0LLQuNC5CgkJZSA9IHNjLm5leHREb3VibGUoKTsKCSAgICBkb3VibGUgeTE7CgkgICAgaW50IGk9MDsKCSAgICBkb3VibGUgeTI9eDsgLy/Qt9Cw0LTQsNC10Lwg0L3QsNGH0LDQu9GM0L3QvtC1INC/0YDQuNCx0LvQuNC20LXQvdC40LUKCSAgICBkbwoJICAgIHsKCSAgICAgICAgeTE9eTI7CgkgICAgICAgIHkyPTAuNSooeTEreC95MSk7IC8v0LLRi9GH0LjRgdC70LXQvdC40LUg0L/QviDQt9Cw0LTQsNC90L3QvtC5INGE0L7RgNC80YPQu9C1CgkgICAgICAgIGk9aSsxOyAvL9C/0L7QtNGB0YfQtdGCINC60L7Qu9C40YfQtdGB0YLQstCwINC40YLQtdGA0LDRhtC40LkKCSAgICB9IHdoaWxlKE1hdGguYWJzK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