using System; public class Test { public static void Main() { Console.WriteLine(b(101010)); } static long b(long n){return n>0?n%10+2*b(n/10):0;} }