#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  int sharp_counter = 0;
  int dot_counter = 0;
  cin >> n >> s;
  for (int i = 0; i < n; i++) {
    if (s.at(i) == '#')
      sharp_counter++;
    else
      dot_counter++;
  }
  if (sharp_counter < dot_counter) {
    cout << dot_counter << endl;
  } else {
    cout << sharp_counter << endl;
  }
}
