#include <stdio.h>
#include<string.h>

int main() {
    int num ;
    printf("Enter a number: ");
    scanf("%d",&num);
    char str[20];
    snprintf(str, sizeof(str), "%d", num);
    int size = strlen(str);

    if(str[0] == '-'| str[0]== '+'){
        size--;
    }
    printf("Number of digits = %d\n",size);   // prints: length of the number
    return 0;
}