#include <bits/stdc++.h>
int main() {
  int n, black = 0, white = 0;
  std::string s;
  std::cin >> n >> s;
  for (char x : s) {
    if (x == '#')
      ++black;
    else
      ++white;
  }
  std::cout << std::min(black, white) << std::endl;
  return 0;
}
