static int countDigits(int x){if(x==0) return 1;int n=x<0?-x:x;int c=0;while(n>0){c++;n/=10;}return c;}
static int countDigits(int x){if(x==0) return 1;int n=x<0?-x:x;int c=0;while(n>0){c++;n/=10;}return c;}