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