1 Like
/* package codechef; // don’t place package name! /
MY APPROACH PLS CORRECT IT
import java.util.;
import java.lang.;
import java.io.;
/* Name of the class has to be “Main” only if the class is public. */
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
String s;
int a;
Scanner sc = new Scanner(System.in);
try{
a=sc.nextInt();
s=sc.nextLine();
int decimal = Integer.parseInt(s,2);
while(a>0)
{
if(decimal % (2^a)==0)
break;
else
a–;
}
System.out.println(a);
}catch (Exception e){}
}
}