#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int N;
  cin >> N;
  string S;
  cin >> S;
  int ans1 = 0;
  int ans2 = 0;
  for (int i = 0; i < N; i++) {
    if (S[i] == '.')
      ans1++;
    else
      ans2++;
  }
  cout << min(ans1, ans2) << endl;
}
