#include <bits/stdc++.h>
int main() {
  int n;
  std::cin >> n;
  std::string s;
  std::cin >> s;
  int count = 0;
  for (size_t i = 0; i < s.length() - 1; i++) {
    if (s[i] == '#' && s[i + 1] == '.') {
      count++;
      s[i + 1] = '#';
    }
  }
  std::cout << count << std::endl;
  return 0;
}
