#include <iostream>
#include<cmath>
#include<vector>
using namespace std;
#define ll long long
#define ld long double

int main(void){
string s;
cin>>s;
string ans="2018";
ans+=s.substr(4);
cout<<ans;
}
// B - Around Square
#include <bits/stdc++.h>
using namespace std;

int main(){
	int N; cin>>N;
	int64_t ans = 0;
	for(int i=1; i*i<=N; ++i) ans = i*i;
	cout<<ans<<endl;
}
