Problem:
Score : 200 points

Problem Statement

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 1

10

Sample Output 1

9

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

Sample Input 2

81

Sample Output 2

81

Sample Input 3

271828182

Sample Output 3

271821169

Solution in C# (Mono 4.6.2.0) (judge verdict: Accepted)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Numerics;


namespace Atcoder01
{
    /*class Program
    {
        //ABC96B
        static void Main()
        {
            int[] input = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int N = int.Parse(Console.ReadLine());
            Array.Sort(input);
            int Ans = input[0] + input[1];
            var ans = input.Max();
            for (int i = 0; i < N; i++)
            {
                ans = ans * 2;
            }
            Console.WriteLine(ans + Ans);
        }
    }*/
    //ABC94B
    /*class Program
    {
        static void Main()
        {
            int[] input = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int[] gate = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int N = input[0];
            int M = input[1];
            int X = input[2];
            int cost1 = 0;
            int cost2 = 0;
            for (int i = 0;i<X;i++)
            {
                if (gate.Contains(i))
                {
                    cost1++;
                }
            }
            for (int i = X;i<= N+1;i++)
            {
                if (gate.Contains(i))
                {
                    cost2++;
                }
            }
            List<int> Answer = new List<int>();
            Answer.Add(cost1);
            Answer.Add(cost2);
            Console.WriteLine(Answer.Min());
        }
    }*/
    //ABC93B
    /*class Program
    {
        static void Main()
        {
            int[] input = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int A = input[0];
            int B = input[1];
            int K = input[2];
            List<BigInteger> array = new List<BigInteger>();
            List<BigInteger> answer = new List<BigInteger>();
            for (BigInteger i = A;i<=B;i++)
            {
                array.Add(i);
            }
            for(BigInteger i =A;i<A+K;i++)
            {
                answer.Add(i);
            }
            for (BigInteger i = B; i > B-K;i--)
            {
                answer.Add(i);
            }
            answer.Sort();
            IEnumerable<BigInteger> result = answer.Distinct();
            foreach (BigInteger aa in result)
            {
                if (array.Contains(aa)) {
                    Console.WriteLine(aa);
                }
            }
        }*/
    /*static void Main()
    {
        int[] input = Console.ReadLine().Split().Select(int.Parse).ToArray();
        int A = input[0];
        int B = input[1];
        int K = input[2];
        List<int> ans1 = new List<int>();
        for (int i=A;i<A+K;i++)
        {
            ans1.Add(i);
        }
        for (int i =B-K+1;i<=B;i++)
        {
            ans1.Add(i);
        }
        ans1.Sort();
        IEnumerable<int> result = ans1.Distinct();
        foreach (BigInteger aa in result)
        {
            if (A<=aa && aa<=B) {
                Console.WriteLine(aa);
            }
        }
       }
    }*/
    //ABC92B
    /*class Program
    {
        static void Main()
        {
            int N = int.Parse(Console.ReadLine());
            int[] input = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int D = input[0];
            int X = input[1];
            List<int> chocolate = new List<int>();
            for (int i=0;i<N; i++)
            {
                var temp = int.Parse(Console.ReadLine());
                chocolate.Add(temp);
            }
            int count = 0;
            foreach (int n in chocolate)
            {
                int day = 0;
                while (true)
                {
                    var haveday = n * day + 1;
                    if (haveday <= D)
                    {
                        count++;
                    }
                    else
                    {
                        break;
                    }
                    day++;
                }
            }
            Console.WriteLine(count + X);
        }
    }*/
    //ABC89B
    /*class Program
    {
        static void Main()
        {
            int N = int.Parse(Console.ReadLine());
            bool flag = false;
            char[] arare = Console.ReadLine().ToCharArray();
            foreach (char n in arare)
            {
                if (n == 'Y')
                {
                    flag = true;
                }
            }
            if (flag == true)
            {
                Console.WriteLine("Four");
            }
            else
            {
                Console.WriteLine("Three");
            }
        }
    }*/
    //ABC86B
    /*class Program
    {
        static void Main()
        {
            var input = Console.ReadLine().Split();
            var a = input[0] + input[1];
            int Ans = Convert.ToInt32(a.ToString());
            double mm = Math.Sqrt((double)Ans);
            if (mm == (int)mm)
            {
                Console.WriteLine("Yes");
            }
            else
            {
                Console.WriteLine("No");
            }
        }
    }*/
    //ABC84B
    /*class Program 
    {
        static void Main()
        {
            int[] input = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int A = input[0];
            int B = input[1];
            var S = Console.ReadLine();
            if (S.Length == A + B + 1)
            {
                for (int i = 0; i < S.Length; i++)
                {
                    if (A == i)
                    {
                        if (S[i] == '-')
                        {
                            var temp1 = S.Substring(0, i);
                            if (temp1.All(char.IsDigit))
                            {
                                temp1 = S.Substring(i + 1, S.Length - (i+1));
                                if (temp1.All(char.IsDigit))
                                {
                                    Console.WriteLine("Yes");
                                }
                                else
                                {
                                    Console.WriteLine("No");
                                }
                            }
                            else
                            {
                                Console.WriteLine("No");
                            }
                        }
                        else
                        {
                            Console.WriteLine("No");
                        }
                    }
                }
            }
            else
            {
                Console.WriteLine("No");
            }
        }
    }*/
    //ABC79B
    /*class Program
    {
        static void Main()
        {
            int N = int.Parse(Console.ReadLine());
            List<BigInteger> ryka = new List<BigInteger>();
            ryka.Add(2);
            ryka.Add(1);
            int count = 2;
            while (count <= N)
            {
                var temp = ryka[count - 2] + ryka[count - 1];
                ryka.Add(temp);
                count++;
            }
            Console.WriteLine(ryka[N]);
        }
    }*/
    //ABC78B
    /*class Program
    {
        static void Main()
        {
            int[] input = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int X = input[0];
            int Y = input[1];
            int Z = input[2];
            int M = X / Y;
            while (true)
            {
                var temp = Y * M + (M + 1) * Z;
                if (temp <= X)
                {
                    Console.WriteLine(M);
                    break;
                }
                else
                {
                    M--; 
                }
            }
        }
    }*/
    class Program
    {
        static void Main()
        {
            int N = int.Parse(Console.ReadLine());
            int Answer = 0;
            while(true)
            {
                var ans = Math.Sqrt(N);
                if (ans == (int)ans)
                {
                    Answer = N;
                    break;
                }
                N--;
            }
            Console.WriteLine(Answer);
        }
    }
}