#include <bits/stdc++.h>
int main() {
  size_t N;
  std::cin >> N;
  std::string buf;
  std::cin >> buf;
  const char* S = buf.c_str();
  bool exist1 = false;
  std::vector<size_t> vec;
  for (size_t i = 0; i < N; i++) {
    if (S[i] == '#') {
      exist1 = true;
      vec.emplace_back(1);
    } else {
      vec.emplace_back(0);
    }
  }
  if (!exist1) {
    std::cout << 0 << std::endl;
    return 0;
  }
  size_t result = 0;
  for (size_t i = 0; i < vec.size() - 1; i++) {
    if (vec[i] == 1 && vec[i + 1] == 0) {
      result++;
      vec[i + 1] = 1;
    }
  }
  std::cout << result << std::endl;
  return 0;
}
