#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, cnt = 0;
  string S;
  cin >> N >> S;
  for (int i = 0; i < N; i++) {
    if (S[i] = '.') cnt++;
  }
  if ((cnt == 0) || (cnt == N))
    cout << "0" << endl;
  else if (cnt < ((N + 1) / 2))
    cout << N - cnt << endl;
  else
    cout << cnt << endl;
}
