#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  set<pair<int, char>> data;
  cin >> n >> s;
  int count[2] = {0};
  for (auto i : s) {
    if (i == '.')
      ++count[0];
    else
      ++count[1];
  }
  const int num = (count[0] < count[1]) ? count[0] : count[1];
  cout << num << endl;
  return 0;
}
