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