#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  string S;
  cin >> N >> S;
  int white = 0, black = 0;
  int inx = 0;
  while (inx < N && S[inx] == '.') {
    inx++;
  }
  while (inx < N) {
    if (S[inx] == '.')
      white++;
    else
      black++;
    inx++;
  }
  cout << min(black, white) << endl;
  return 0;
}
