#include <bits/stdc++.h>
int main() {
  int N;
  std::string S;
  std::cin >> N >> S;
  int wc = 0, bc = 0;
  for (int i = 0; i < S.size(); i++) {
    if (i == 0) {
      if (S[i] != '.') {
        bc++;
      }
      continue;
    }
    if (S[i] == '.') {
      wc++;
    } else {
      bc++;
    }
  }
  std::cout << std::min(wc, bc) << std::endl;
}
