N = int(eval(input()))

import math

for i in range(N):

     if int(math.sqrt(N-i)) == math.sqrt(N-i):

         print((N-i))

         exit()

     else:

         continue
N = int(eval(input()))

import math

for i in range(N,0,-1):

    if int(math.sqrt(i)) == math.sqrt(i):

        print(i)

        exit()
N = int(eval(input()))
import math

for i in range(N):
    if int(math.sqrt(N - i)) == math.sqrt(N - i):
        print((N - i))
        exit()
    else:
        continue

N = int(eval(input()))
import math

for i in range(N, 0, -1):
    if int(math.sqrt(i)) == math.sqrt(i):
        print(i)
        exit()

-for i in range(N): -    if int(math.sqrt(N - i)) == math.sqrt(N - i): -        print((N - i)) +for i in range(N, 0, -1): +    if int(math.sqrt(i)) == math.sqrt(i): +        print(i) -    else: -        continue