#include #include #include #include #define rep(i,a,b) for(int i=(a);i<(b);i++) #define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--) #define all(x) begin(x),end(x) #define sz(x) (int)(x).size() using namespace std; using namespace atcoder; using ll=long long; using ull=unsigned long long; using ld=long double; using vll=vector; using vvll=vector; using vi=vector; using vvi=vector; using pll=pair; using pi=pair; // using mint=modint998244353; using mint=modint1000000007; // using mint2=static_modint<2>; // using BoostPoint=boost::polygon::point_data; // using Voronoi=boost::polygon::voronoi_diagram; // using mint=LazyMontgomeryModInt<998244353>; using vm=vector; using vvm=vector; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); /** * wikiにそのまま乗っています * Parity: To count odd terms in row n, convert n to binary. * Let x be the number of 1s in the binary representation. * Then the number of odd terms will be 2^x. * These numbers are the values in Gould's sequence.[24] * * https://en.wikipedia.org/wiki/Pascal's_triangle * * 自力ACできませんでしたが */ ull N; cin>>N; cout<