#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[]) {
  int N;
  cin >> N;
  string S;
  cin >> S;
  int num1 = 0;
  int num2 = 0;
  for (int i = 0; i < N; i++) {
    if (S[i] == '.') {
      num1++;
    } else {
      num2++;
    }
  }
  cout << min(num1, num2) << endl;
  return 0;
}
