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