#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main(){
	int c = 0,c2 = 0;
	string str;
	cin >> str;
	for(auto &i : str){
		if(i == '.'){
			c++;
		}else{
			c1++;
		}
	}
	cout << min(c,c1) << endl;
}