def multiple(n):

    a = []

    for i in range(1,int(n**.5)+1):

        a.append(i*i)

    return a

n = int(eval(input()))

a = multiple(n)

ans = 10**18

for i in a:

    if n-i < 0:

        continue

    ans = min(ans,abs(n-i))

print((n-ans))
n = int(eval(input()))

for i in range(1,n+2):

    if i*i > n:

        print(((i-1)*(i-1)))

        exit()
def multiple(n):
    a = []
    for i in range(1, int(n**0.5) + 1):
        a.append(i * i)
    return a


n = int(eval(input()))
a = multiple(n)
ans = 10**18
for i in a:
    if n - i < 0:
        continue
    ans = min(ans, abs(n - i))
print((n - ans))

n = int(eval(input()))
for i in range(1, n + 2):
    if i * i > n:
        print(((i - 1) * (i - 1)))
        exit()

-def multiple(n): -    a = [] -    for i in range(1, int(n**0.5) + 1): -        a.append(i * i) -    return a - - -a = multiple(n) -ans = 10**18 -for i in a: -    if n - i < 0: -        continue -    ans = min(ans, abs(n - i)) -print((n - ans)) +for i in range(1, n + 2): +    if i * i > n: +        print(((i - 1) * (i - 1))) +        exit()