#define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include using namespace std; typedef long long lint; #define MIN(a,b) ((a)<(b)?(a):(b)) #define MAX(a,b) ((a)>(b)?(a):(b)) int main() { int Y; cin >> Y; cout << 2017 - Y << endl; return 0; }