#include<bits/stdc++.h>
using namespace std;

using ll = long long;
const ll amari = 1e9+7;
#define ben(a) a.begin(),a.end()
#define pb(a,b) a.push_back(b)

int main(){
	int n;
	string s;
	cin >> n >> s;
	int b = 0;
	int w = 0;
	for(int i = 0; i < n; i++){
		if(s[i] == '.')w++;
		else b++
	}
	cout << min(b,w) << endl;
	return 0;
}
//g++ AtCoder.cpp