#include<bits/stdc++.h> using namespace std; int main(){ int n,a=10000,b=10000; cin>>n; if(n%2==0){ cout<<b-(n-2); } else{ cout<<a-n/2; } return 0; }