#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  char s[N];
  for (int i = 0; i < N; i++) {
    cin >> s[i];
  }
  char black = '#';
  char white = '.';
  int bcounter = 0;
  int wcounter = 0;
  for (int i = 0; i < N; i++) {
    if (s[i] == black)
      bcounter++;
    else
      wcounter++;
  }
  if (bcounter < wcounter)
    cout << bcounter << endl;
  else
    cout << wcounter << endl;
  return 0;
}
