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