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