#include <iostream>
#include <cstdlib>
#include <cmath>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
int main(int argc, char *argv[]) {
int y;
while(cin>>y)
{
cout<<y-1911<<endl;
}
return 0;
}