#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  int n, i;
  int a = 0, b = 0;
  cin >> n;
  cin >> str;
  for (i = 0; i < n; i++) {
    if (str[i] == '.') {
      a++;
    } else {
      b++;
    }
  }
  if (a > b) {
    cout << b << endl;
  } else {
    cout << a << endl;
  }
  return 0;
}
