#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
int main() {
  int n;
  string s;
  cin >> n >> s;
  int white = 0;
  int black = 0;
  if (n == 2) {
    if (s[0] == '.') cout << 0;
    return 0;
  } else if (n == 3) {
    if ((s[1] == '#' && s[2] == '#') || (s[0] == '.' && s[1] == '.')) {
      cout << 0;
      return 0;
    }
  }
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '.')
      white++;
    else
      black++;
  }
  cout << min(white, black) << endl;
  return 0;
}
