#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int count1 = 0;
  int count2 = 0;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '.') {
      count1++;
    } else {
      count2++;
    }
  }
  if (count1 < count2) {
    cout << count1;
  } else {
    cout << count2;
  }
  return 0;
}
