#include <iostream>
#include <cmath>
using namespace std;
int main(){
    int n;
    cin >> n;
    while (n) {
        int k = (int)sqrt(n);
        if (k*k==n) {
            cout << n;
            break;
        }
        else if(k*k==n)
        {
            cout << n;
            break;
        }
        n--;
    }
    return 0;
}
