#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
struct node
{
int l,r,val;
node()
{
l=r=val=0;
}
};
vector<node> v(1);
int build(int s,int e)
{
int p=v.size();
v.push_back(node());
if(s==e)
return p;
int mid=(s+e)/2;
build(s,mid);
build(mid+1,e);
return p;
}
int main()
{
const int n = 100000 ;
int r=build(1,n);
return 0;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KCnVzaW5nIG5hbWVzcGFjZSBzdGQ7Cgp0eXBlZGVmIGxvbmcgbG9uZyBsbDsKCnN0cnVjdCBub2RlCnsKICAgIGludCBsLHIsdmFsOwogICAgbm9kZSgpCiAgICB7CiAgICAgICAgbD1yPXZhbD0wOwogICAgfQp9OwoKdmVjdG9yPG5vZGU+IHYoMSk7CgppbnQgYnVpbGQoaW50IHMsaW50IGUpCnsKICAgIGludCBwPXYuc2l6ZSgpOwogICAgdi5wdXNoX2JhY2sobm9kZSgpKTsKICAgIGlmKHM9PWUpCiAgICAgICAgcmV0dXJuIHA7CiAgICBpbnQgbWlkPShzK2UpLzI7CiAgICBidWlsZChzLG1pZCk7CiAgICBidWlsZChtaWQrMSxlKTsKICAgIHJldHVybiBwOwp9CgoKaW50IG1haW4oKQp7CiAgICBjb25zdCBpbnQgbiA9IDEwMDAwMCA7CiAgICBpbnQgcj1idWlsZCgxLG4pOwogICAgcmV0dXJuIDA7Cn0K