#include <iostream>
#include <string>
using namespace std;
void countno(string s, int *a, int *b){
int i, dot = -1, len = 0;
for(i=0; s[i]!='\0'; i++){
len ++;
if(s[i]=='.'){dot=i;}
}
switch(dot){
case -1: // dot not found
*a = len;
*b = 0;
break;
default: // dot found
*a = len-1;
*b = len-dot-1;
}
return;
}
int main(void){
int fig, dec;
string str;
while(1){
cout << "input:";
cin >> str;
countno(str, &fig, &dec);
cout << "総桁数:" << fig << endl;
cout << "小数点以下の桁数:" << dec << endl;
}
return 0;
}