#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, a = 0;
  string s;
  cin >> n >> s;
  while (n > 0 && s[0] == '.') {
    s.erase(0.1);
    n--;
  }
  for (i = 0; i < n; i++)
    if (s[i] == '.') a++;
  cout << min(a, n - a) << endl;
  return 0;
}
