import java.util.;
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner x=new Scanner(System.in);
System.out.println(“enter a binary no.”);
int a=x.nextInt();
int i=0;
double s=0;
int r;
while(a!=0)
{
r=a%10;
a=a/10;
double p=Math.pow(2,i);
s=s+rp;
i++;
}
System.out.println(s);
}
}