#include #include using namespace std; int main(){ int Y; cin >> Y; cout << 2017 - Y << endl; }