#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define rep(x, s, t) for(llint (x) = (s); (x) <= (t); (x)++) #define reps(x, s) for(llint (x) = 0; (x) < (llint)(s).size(); (x)++) #define chmin(x, y) (x) = min((x), (y)) #define chmax(x, y) (x) = max((x), (y)) #define sz(x) ((ll)(x).size()) #define ceil(x, y) (((x)+(y)-1) / (y)) #define all(x) (x).begin(),(x).end() #define outl(...) dump_func(__VA_ARGS__) #define inf 1e18 using namespace std; typedef long long llint; typedef long long ll; typedef pair P; bool exceed(ll x, ll y, ll m){return x >= m / y + 1;} struct edge{ ll to, cost; edge(){} edge(ll a, ll b){ to = a, cost = b; } }; template ostream& operator << (ostream& os, vector& vec) { for(int i = 0; i ostream& operator << (ostream& os, pair& pair_var) { os << "(" << pair_var.first << ", " << pair_var.second << ")"; return os; } template ostream& operator << (ostream& os, map& map_var) { for(typename map::iterator itr = map_var.begin(); itr != map_var.end(); itr++) { os << "(" << itr->first << ", " << itr->second << ")"; itr++; if(itr != map_var.end()) os << ","; itr--; } return os; } template ostream& operator << (ostream& os, set& set_var) { for(typename set::iterator itr = set_var.begin(); itr != set_var.end(); itr++) { os << *itr; ++itr; if(itr != set_var.end()) os << " "; itr--; } return os; } void dump_func() {cout << endl;} template void dump_func(Head &&head, Tail &&... tail) { cout << head; if(sizeof...(Tail) > 0) cout << " "; dump_func(std::move(tail)...); } ll n; int main(void) { ios::sync_with_stdio(0); cin.tie(0); cin >> n; if(n % 2) outl(1); else outl(n/2+1); return 0; }