https://www.acmicpc.net/problem/1094
#include<stdio.h>
int main() {
int n;
scanf("%d",&n);
int sum=64;
int a=64;
int count=1;
if(n==64) printf("1");
else{
for(int i=0;i<7;i++){
if(sum-a/2>n) sum-=a/2;
else if(sum-a/2<n) count++;
a/=2;
}
printf("%d",count);
}
}