import java.util.*; public class BreakingSticks { public static void main(String[] args) { // TODO Auto-generated method stub int a; Scanner s=new Scanner(System.in); a=s.nextInt(); long arr[]=new long[a]; for(int i=0;i1&&p%2!=0) { count=count+p+1; } else { count=count +p+1; while(p%2!=1){ count=count+p/2; p=p/2; } } } System.out.println(count); s.close(); } }