#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  cin >> n;
  cin >> s;
  int minimum = 1 + n / 2;
  for (int i = 0; i < n + 1; i++) {
    string former;
    for (int j = 0; j < i; j++) {
      former.push_back(s[j]);
    }
    string later;
    for (int j = i; j < n; j++) {
      later.push_back(s[j]);
    }
    int sum = 0;
    for (auto c : former) {
      if (c == '#') sum++;
    }
    for (auto c : later) {
      if (c == '.') sum++;
    }
    minimum = minimum < sum ? minimum : sum;
  }
  cout << minimum << endl;
}
