#include <bits/stdc++.h>
using namespace std;
int main() {
  int counter, i, n, counter2, j;
  string s, str;
  cin >> n;
  cin >> s;
  counter = 0;
  counter2 = 1000000000;
  for (i = 0; i < n; i++) {
    str[i] = '.';
  }
  counter2 = 0;
  counter = 0;
  for (i = 0; i < n; i++) {
    if (s[i] != str[i]) {
      counter2++;
    }
  }
  for (i = 0; i < n; i++) {
    str[(n - 1 - i)] = '#';
    counter = 0;
    for (j = 0; j <= n - 1; j++) {
      if (s[j] != str[j]) {
        counter++;
      }
    }
    if (counter2 > counter) {
      counter2 = counter;
    }
  }
  cout << counter2 << endl;
}
