import java.io.PrintStream; public class Binary { public static void main(String[] args) { PrintStream out = System.out; int value = Integer.parseInt(args[0]); int hundreds = value / 100; value = value % 100; int tens = value / 10; value = value % 10; int ones = value; int decimal = 4 * hundreds + 2 * tens + 1 * ones; out.println(decimal); } }