#pragma GCC optimize("Ofast") #pragma GCC target("avx2") char*mmap(); #define rd(v) int v=0;{int _c;while(_c=*rp++-48,_c>=0)v=v*10+_c;} #define wt_rev(v) {long _z=v;do*--wp=_z%10+48;while(_z/=10);} unsigned long vis[50000000/64+4]; main(){ char*rp=mmap(0l,1l<<25,1,2,0,0ll); rd(n); long res=0; long n4=n/4+1; for(long i=1;i>6]&1ul<>6]|=1ul<>6]|=~0ul>>-n4; } vis[n+1>>6]|=~0ul<>6; for(long i=n4>>6;i<=e;++i){ res+=__builtin_popcountl(~vis[i]); } char wbuf[64],*wp=wbuf+sizeof wbuf; wt_rev(res); write(1,wp,wbuf+sizeof wbuf-wp); _exit(0); }