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