#include <bits/stdc++.h>
using namespace std;
using LLI = long long int;
LLI N;
int main(void) {
  string S;
  LLI dot = 0, sharp = 0;
  cin >> N >> S;
  for (int i = 0; i < N; i++) {
    if (S[i] == '.') {
      dot++;
    } else {
      sharp++;
    }
  }
  cout << min(dot, sharp) << endl;
}
