function getLength(num){
var count = 0;
while(num != 0){
num = parseInt(num/10);
count++;
}
return count;
}
function getLength(num){
return num.toString().length;
}