#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int N, count, ans;
  string S;
  cin >> N >> S;
  for (int i = 0; i < N; i++) {
    if (S[i] == '#') count++;
  }
  ans = min(count, N / 2);
  cout << ans << endl;
}
