Find the largest square number not exceeding N. Here, a square number is an integer that can be represented as the square of an integer.

-----Constraints-----
 - 1 \leq N \leq 10^9
 - N is an integer.

-----Input-----
Input is given from Standard Input in the following format:
N

-----Output-----
Print the largest square number not exceeding N.

-----Sample Input-----
10

-----Sample Output-----
9

10 is not square, but 9 = 3 × 3 is. Thus, we print 9.

Difficulty: introductory

Starter code:

Solutions:
N = int (input ())
x = 1
while x**2 <= N:
  x += 1
x -= 1
print (x**2)

#
# abc077 b
#
import sys
from io import StringIO
import unittest
import math


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """10"""
        output = """9"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """81"""
        output = """81"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """271828182"""
        output = """271821169"""
        self.assertIO(input, output)


def resolve():
    N = int(input())
    print((math.floor(math.sqrt(N))**2))


def __starting_point():
    # unittest.main()
    resolve()

__starting_point()

n = int(input())

i=1
while i*i <= n:
    ans = i*i
    i+=1
print(ans)

n = int(input())
print(int(n**(1/2))**2)

N = int(input())
i = 1
if N == 1:
    print(i)
else:
    while i <= N:
        if((i * i) > N):
            print((i-1) * (i-1))
            break
        i += 1

from math import sqrt

n = int(input())

for i in range(int(sqrt(n) + 1)):
    if i ** 2 <= n:
        ans = i ** 2
print(ans)

from math import sqrt
n = int(input())
print(int(sqrt(n))**2)

#!/usr/bin/env python3
N = int(input())

ans = 0
for i in range(1, 10**5):
    n = i ** 2
    if n <= N:
        ans = n
    else:
        break
print(ans)


print(int(int(input())**.5)**2)

a=int(input())
i=0
while i**2<=a:
  i=i+1
print((i-1)**2)

n = int(input())

for i in range(n, 0, -1):
  j = int(i ** 0.5)
  if int(j) ** 2 == i:
    break
print(i)


print((int(int(input())**0.5)**2))


import math
x=int(input())
y= math.sqrt(x)
z= y//1
a=z**2
print(int(a))

n = int(input())
print((int(n ** 0.5) ** 2))


n = int(input())
while (n ** 0.5) % 1 != 0:
    n -= 1
print(n)

print(int(int(input()) ** 0.5) ** 2)

from math import sqrt

n = int(input())

ans = int(sqrt(n))

if (ans + 1) * (ans + 1) <= n:
    print((ans + 1) * (ans + 1))
elif ans * ans <= n:
    print(ans * ans)
else:
    print((ans - 1) * (ans - 1))

print(int(int(input())**0.5//1)**2)

N=int(input())
ans=1
for i in range(N+1):
    if i*i<=N:
        ans=i
    else:
        break
print((ans**2))


n = int(input())
x = 1
while x * x <= n:
    x += 1
 
x -= 1
print(x * x)

n = int(input())
print(int(n ** 0.5) ** 2)

n = int(input())
for i in range(100000):
  if n >= (10**5-i)**2:
    print((10**5-i)**2)
    return

n=int(input())
print(int(n**(1/2))**2)

import math
print(int(math.sqrt(int(input())))**2)

from math import sqrt
n=int(input())
for i in range(1,int(sqrt(n))+1):
  if i**2>n:
    print((i-1)**2)
    break
else:
  print(i**2)

import sys
N=int(input())
if N==1:
    print("1")
elif N==2:
    print("1")
else:
    for i in range(N):
        if i**2>N:
            print((i-1)**2)
            return
        else:
            pass

import math
N=int(input())
c=int(math.sqrt(N))
print(c**2)

n=int(input())
i=1
tmp=1
while True:
  if i**2 <= n:
    tmp = i**2
  else:
    break
  i += 1
print(tmp)

def multiple(n):
    a = []
    for i in range(1,int(n**.5)+1):
        a.append(i*i)
    return a
n = int(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)

# coding = SJIS

n = int(input())

for i in range(n):
    if int((n - i) ** 0.5) == (n - i) ** 0.5:
        print((n - i))
        return


import math
a=int(input())
b=math.sqrt(a)
n=math.ceil(b)
m=math.floor(b)
print(m**2)

N=int(input())
for i in range(int(N**0.5)+1):
    if N>=i**2:
        ans=i**2
    else:
        break
print(ans)

import math


def answer(n: int) -> int:
    return int(math.sqrt(n)) ** 2


def main():
    n = int(input())
    print(answer(n))


def __starting_point():
    main()
__starting_point()

n=int(input())
for i in range(1,10**5+2):
  if i**2>n:print(((i-1)**2));return


n = int(input())
for i in range(100000):
  if i**2 > n:
    print((i-1)**2)
    break

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

print((int(int(input())**.5)**2))


n = int(input())
ans=1
for i in range(n+1):
    if i**2<=n:
        ans=i**2
    else:
        break

print(ans)

import math
N = int(input())

ans = 1
for i in range(1,math.floor(math.sqrt(N))+1):
  if i * i <= N:
    ans = i * i
    
print(ans)

def main():
    N = int(input())
    a = 1
    i = 0
    prev = 0
    while a <= N:
        i += 1
        prev = a
        if a > N:
            break
        else:
            a = i * i
    print(prev) 
main()


print(int(int(input())**.5)**2)

import math
N = int(input())
for i in range(N):
  x = N - i
  if int(math.sqrt(x)) == math.sqrt(x):
    print(x)
    break


N = int(input())

from math import floor, sqrt
ans = floor(sqrt(N))**2
print(ans)


n = int(input())
print(int(n**0.5)**2)

N = int(input())
for i in range(1, N+1):
    if i*i > N:
        print(((i-1)*(i-1)))
        return
print((1))


N = int(input())
 
print(int(N**0.5)**2)

N = int(input())
print(int(N**(1/2))**2)

N = int(input())
print(int((N**(1/2)//1)**2))

n=int(input())

ans=1
loop = 3
for i in range (1,100000):
        if i**2 <= n:
                ans=i**2
        
        

print(ans)

n=int(input())
i=1
tmp=1
while True:
  if i**2<=n:
    tmp=i**2
  else:
    break
  i+=1
print(tmp)

n = int(input())
print((int(n ** 0.5)) ** 2)

N = int(input())

for i in range(1, 10**9):
  if i**2 == N:
    print((i**2))
    break
  elif i**2 > N:
    print(((i-1)**2))
    break


N = int(input())
print((int(N**(1/2))**2))


n = int(input())
print((int(n**(1/2)))**2)

n = int(input())


ans = 1
for i in range(1, n):
  if i**2 > n:
    ans = (i-1)**2
    break


print(ans)

import math
ans=math.floor(int(input())**0.5)
print (ans*ans)

N = int(input())
ans = 1
for i in range(1, N):
    if i*i > N:
        break
    ans = max(ans, i*i)
print(ans)

print(int(int(input())**.5)**2)

n = int(input())
ans = 0
for i in range(100001):
    if i **2 <= n:
        ans = i**2
    
print(ans)


import math

N=int(input())
n=math.floor(math.sqrt(N))**2

print(n)



n = int(input())
print(int(n ** 0.5) ** 2)

from math import sqrt

n = int(input())
print(int(sqrt(n)) ** 2)

import math
n = int(input())
print(int(math.sqrt(n))**2)

import math
n = int(input())
print(int(math.sqrt(n))**2)

n = int(input())
c = 1
for i in range(10**5):
    if i**2 <= n:c = i**2
    else:break
print(c)

N = int(input())

for i in range(int(N**0.5)+3):
  if i**2 > N:
    print((i-1)**2)
    break

n = int(input())
print(int(n**.5) ** 2)

import math
N=int(input())
ans=N
for i in range(N):
  if math.sqrt(ans).is_integer():
    print(ans)
    break
  ans-=1

N=int(input())
import math
print((int(math.sqrt(N)))**2)

n = int(input())

for i in range(1, 10**5):
    p = i**2
    if p > n:
        print((i-1)**2)
        break

import math

n = int(input())
print(math.floor(math.sqrt(n)) ** 2)

N=int(input())
print(int(N**(1/2))**2)

n = int(input())

ans = 0
max = int(n**0.5)+1
for i in range(1, max, 1):
    tmp = i**2
    if tmp <= n:
        ans = tmp
print(ans)

n=int(input())

for i in range(10**5):
    if i**2 > n:
        print((i-1)**2)
        break

n = int(input())
p = int(n**0.5)
a = 1
ans = 1
while a<=p:
    if a**2 <=n:
        ans = max(ans,a**2)
    a +=1
print(ans)

N = int(input())
print(int(N**(0.5))**2)

N=int(input())
if int((N+1)**.5)**2==N:print(N)
else:print(int(N**.5)**2)

N = int(input())
print((int(N**.5)**2))


N = int(input())
print(int(N**0.5)**2)

N = int(input())
from math import sqrt, floor
for i in range(1,floor(sqrt(N))+2):
    if i**2 > N:
        print((i-1)**2)

import math
n = int(input())

for i in range(10**5):
    if n < i ** 2:
        print((i-1) ** 2)
        break

n=int(input())
print(int(n**0.5)**2)

n=int(input())
res=1
for i in range(100000):
    if i**2>n:
        break
    res=i*i
print(res)

n = int(input())
for i in range(1, n):
    if i**2 > n:
        print((i-1)**2)
        break
else:
    print(1)

import math
n = int(input())
for i in range(10**9):
  if math.sqrt(n) == int(math.sqrt(n)):
    print(n)
    break
  n -= 1


N=int(input())
if N==1 :
  print(1)
  return
for i in range(1,N+1) :
  if i*i>N :
    print((i-1)*(i-1))
    return

n = int(input())

ans = 0
for i in range(1, 10 ** 5):
    if i ** 2 <= n:
        ans = i ** 2

print(ans)


import math

n = int(input())
print(math.floor(math.sqrt(n)) ** 2)

x = int(input())
for i in range(10**5):
  if i**2>x:
    a=((i-1)**2)
    break
print(a)

import math
n = int(input())
print(int(math.sqrt(n)) * int(math.sqrt(n)))

#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]
#a = [list(input()) for _ in range(n)]
#a = [int(input()) for _ in range(n)]

n = int(input())

ans = 1
for i in range(1,n+1):
    if (i*i > n):
        ans =  (i-1)**2
        break
print(ans)





import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: list(map(int, sys.stdin.readline().split()))
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

n = ri()
a = int(n**0.5)
print((a**2))












N = int(input())
for i in range(N+1):
    if i ** 2 == N:
        print((i**2))
        return
    elif i ** 2 > N:
        print((max((i-1)**2,1)))
        return


n = int(input())
ans = 0
k = 1
while k ** 2 <= n:
  ans = k ** 2
  k += 1
print(ans)

#ABC077B
n = int(input())
while n>0:
    tmp = n**(1/2)
    if(tmp==int(tmp)):
        print(n)
        break
    n-=1

#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**6)

n = int(input())

ans = 1
for i in range(0, n):
    if (ans+1)**2 > n:
        break
    ans += 1
print((ans**2))


import math
n = int(input())
tmp = int(math.sqrt(n))
print(tmp**2)

N = int(input())

i = 1
while i*i <= N:
  i += 1

print((i-1)**2)

N=int(input())
C=0
if N==1:
  print(1)
  return
for i in range(1,N):
  if i**2<N:
    C=i**2
  elif i**2==N:
    C=i**2
    break
  elif i**2>N:
    break
print(C)