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