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