#include <iostream>
#include <string>
#include <algorithm>
using namespace std;

int main()
{
    int n;
    cin >> s;
    int bl = 0;
    int wh = 0;
    for(int i = 0; i < n; i++){
        if(s[i] = '*'){
            bl++;
        }
        else{
            wh++;
        }
    }
    cout << min(bl, wh) << endl;
}