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