#include <Stdio.h>
#include <stdlib.h>
int re(int n)
{
if (n==1) return 1;
return re(n/2) + re(n-1);
}
int main(void)
{
printf("%d\n",re(1));
printf("%d\n",re(2));
printf("%d\n",re(3));
printf("%d\n",re(4));
printf("%d\n",re(5));
printf("%d\n",re(6));
printf("%d\n",re(7));
printf("%d\n",re(8));
system("pause");
return 0;
}