#include using namespace std; using ll = long long; using ull = unsigned long long; constexpr int MOD = 998244353; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, l, r) for (int i = (l); i < (int)(r); i++) #define all(v) v.begin(), v.end() int main() { ios::sync_with_stdio(false); cin.tie(nullptr); ull N; cin>>N; ull N1=N+1; if(N%2==0)N/=2; if(N1%2==0)N1/=2; cout<