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