#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<char> S(N);
  for (int i = 0; i < S.size(); i++) {
    cin >> S.at(i);
  }
  int siro_num = count(S.begin(), S.end(), '.');
  int kuro_num = count(S.begin(), S.end(), '#');
  int ans = min(siro_num, kuro_num);
  cout << ans << endl;
}
