#include typedef long long LL; int main() { LL L=1,R,M,n,a; scanf("%lld",&n); R=n; while(L