#include using namespace std; #define int long long #define all(v) (v).begin(), (v).end() #define resz(v, ...) (v).clear(), (v).resize(__VA_ARGS__) #define reps(i, m, n) for(int i = (int)(m); i < (int)(n); i++) #define rep(i, n) reps(i, 0, n) template void chmin(T1 &a, T2 b){if(a>b)a=b;} template void chmax(T1 &a, T2 b){if(a Pi; typedef tuple Ti; typedef vector vint; const int inf = 1LL << 55; const int mod = 1e9 + 7; int Y; signed main() { cin.tie(0); ios_base::sync_with_stdio(0); cout << fixed << setprecision(12); cin >> Y; cout << 2017-Y << endl; return 0; }