#include <bits/stdc++.h>
using namespace std;
int main(void) {
  long long N;
  string S;
  cin >> N >> S;
  long long count = 0;
  for (int i = 0; i < S.size(); i++) {
    if (i != S.size() - 1) {
      count = S[i + 1] == '.' ? count + 1 : count;
    }
  }
  if (count == N - 1) {
    cout << 0 << endl;
    return 0;
  }
  cout << min(N - count, count) << endl;
  return 0;
}
