#include <bits/stdc++.h>
int main() {
  int n;
  std::string s;
  char ans[n];
  std::cin >> n >> s;
  int bc = 0, wc = 0;
  for (int ii = 0; ii < n; ++ii) {
    if (s[ii] == '#') {
      ++bc;
    } else {
      ++wc;
    }
  }
  if (bc > wc) {
    std::cout << wc;
  } else {
    std::cout << bc;
  }
}
