#include <cstdio>

int main()
{
    int a,b,c,sum;
    scanf("%d/%d/%d",&a,&b,&c);
    
    sum = a + 1;
    
    if(b < 10)
    {
        printf("%d/0%d",sum,b);
    }
    else
    {
        printf("%d/%d",sum,b);
    }
    
    
    if(c < 10)
    {
        printf("/0%d",c);
    }
    else 
    {
        printf("/%d",c);
    }
    
    
    

}


#define _GIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define all(v) v.begin(), v.end()
using namespace std;
using ll = long long;
using P = pair<int, int>;


const ll MAX_N = 1000000010;

int main(void) {
  ll n;
  cin >> n;

  vector<ll> v;
  ll num = 1;
  while (num * num < MAX_N) {
    v.push_back(num * num);
    num++;
  }

  reverse(v.begin(), v.end());

  for (auto sq : v) {
    if (sq <= n) {
      cout << sq << endl;
      return 0;
    }
  }
  
  return 0;
}