#include <stdio.h>
#include <string.h>
#define x(k) (((k) >= 0) ? in[strlen(in) - 1 - (k)] - '0' : 0)
void esr(char *in, char *out, int len)
{
int n, i, a, r, q, z, t;
char *p;
p = out;
n = ((len - 1) / 2) * 2;
r = 0;
q = 0;
a = 0;
z = 10 * x(n + 1) + x(n);
i = n - 1;
do {
for(a = 0; a <= 9; a++) {
if ((10 * q + a) * a <= z && z < (10 * q + (a + 1)) * (a + 1))
break;
}
if (i == -3)
*p++ = '.';
*p++ = a + '0';
r = (10 * q + a) * a;
q = 10 * q + 2 * a;
z = 100 * (z - r) + 10 * x(i);
i--;
z = z + x(i);
i--;
} while (i >= -3);
*p = '\0';
return;
}
#define N 8
int main()
{
static char in[N + 1], out[N];
int n;
char *p;
in[0] = '0';
for (p = in; *p != '\n'; p++);
*p = '\0';
if (n % 2 == 0)
esr(in + 1, out, n);
else
esr(in, out, n);
return 0;
}
/* end */
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KCiNkZWZpbmUgeChrKSAoKChrKSA+PSAwKSA/IGluW3N0cmxlbihpbikgLSAxIC0gKGspXSAtICcwJyA6IDApCnZvaWQgZXNyKGNoYXIgKmluLCBjaGFyICpvdXQsIGludCBsZW4pCnsKICBpbnQgbiwgaSwgYSwgciwgcSwgeiwgdDsKICBjaGFyICpwOwoKICBwID0gb3V0OwogIG4gPSAoKGxlbiAtIDEpIC8gMikgKiAyOwogIHIgPSAwOwogIHEgPSAwOwogIGEgPSAwOwogIHogPSAxMCAqIHgobiArIDEpICsgeChuKTsKICBpID0gbiAtIDE7CiAgCiAgZG8gewogICAgZm9yKGEgPSAwOyBhIDw9IDk7IGErKykgewogICAgICBpZiAoKDEwICogcSArIGEpICogYSA8PSB6ICYmIHogPCAoMTAgKiBxICsgKGEgKyAxKSkgKiAoYSArIDEpKQogICAgICAgIGJyZWFrOwogICAgfQogICAgaWYgKGkgPT0gLTMpCiAgICAgICpwKysgPSAnLic7CiAgICAqcCsrID0gYSArICcwJzsKICAgIHIgPSAoMTAgKiBxICsgYSkgKiBhOwogICAgcSA9IDEwICogcSArIDIgKiBhOwogICAgeiA9IDEwMCAqICh6IC0gcikgKyAxMCAqIHgoaSk7CiAgICBpLS07CiAgICB6ID0geiArIHgoaSk7CiAgICBpLS07CiAgfSB3aGlsZSAoaSA+PSAtMyk7CiAgKnAgPSAnXDAnOwogIHJldHVybjsKfQoKI2RlZmluZSBOIDgKaW50IG1haW4oKQp7CiAgc3RhdGljIGNoYXIgaW5bTiArIDFdLCBvdXRbTl07CiAgaW50IG47CiAgY2hhciAqcDsKCiAgcHJpbnRmKCI+Iik7CiAgZmdldHMoaW4gKyAxLCBOLCBzdGRpbik7CiAgaW5bMF0gPSAnMCc7CiAgZm9yIChwID0gaW47ICpwICE9ICdcbic7IHArKyk7CiAgKnAgPSAnXDAnOwogIG4gPSBzdHJsZW4oaW4gKyAxKTsKCiAgaWYgKG4gJSAyID09IDApCiAgICBlc3IoaW4gKyAxLCBvdXQsIG4pOwogIGVsc2UKICAgIGVzcihpbiwgb3V0LCBuKTsKCiAgcHJpbnRmKCIlc1xuIiwgb3V0LCBuKTsKICByZXR1cm4gMDsKfQovKiBlbmQgKi8K