#include <bits/stdc++.h>
using namespace std;
int main() {
  long int n;
  string s;
  cin >> n;
  int cnt = 0, cnt1 = 0;
  for (int i = 0; i < n; i++) {
    cin >> s[i];
    if (s[i] == '#') {
      cnt++;
    } else if (s[i] == '.') {
      cnt1++;
    }
  }
  cout << min(cnt, cnt1) << endl;
}
