using System;

class Program5
{
    static void Main()
    {
        Console.WriteLine(CountDigits(87346));  
        Console.WriteLine(CountDigits(-123));   
        Console.WriteLine(CountDigits(0));       
        }

    static int CountDigits(int number)
    {
        return number == 0 ? 1 : number.ToString().TrimStart('-').Length;
    }
}