#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define repr(i, n) for(int i = ((int)(n) - 1); i >= 0; i--)
#define repn(i, n) for(int i = 1; i <= (int)(n); i++)
#define reprn(i, n) for(int i = ((int)(n)); i > 0; i--)
#define all(x) (x).begin(), (x).end()
using llint = long long int;
using lint = long int;

#include <iostream>
#include <array>
#include <string>
#include <algorithm>
#include <vector>
#include <iomanip>
using namespace std;

int main() {
	int n;
	string s;
	cin >> n >> s;
	if (s.find(".") == string::npos) {
		cout << 0 << endl;
		return 0;
	}
	if (s.find("#") == string::npos) {
		cout << 0 << endl;
		return 0;
	}
	int ans = 100000;
	rep(i, s.length()) {
		ans = min(ans, count(s.cbegin() + i, s.cend(), '.') + count(s.cbegin(), s.cbegin() + i, '#'));
	}
	cout << ans << endl;
	return 0;
}