long v = Convert.ToInt32(Console.ReadLine());
int cif;
int cif1;
int brojNovcanica = 0;                          
    while (v > 9)
    {
                cif = Convert.ToInt32(Math.Floor(Math.Log10(v) + 1));
                cif1 = Convert.ToInt32(v / Math.Pow(10, cif - 1));                     
                
                if (cif1 < 2)
                {
                    v = v - Convert.ToInt32(Math.Pow(10, cif - 1));
                }
    }