#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main()
{
	int N;
	string S;
	cin >> N >> S;
	int white = 0, black = 0;
	while(inx < N)
	{
		if(S[inx] =='.') white++;
		else black++;
		inx++;
	}
	cout << min(black, white) << endl;
	return 0;
}
