#include <bits/stdc++.h>
int main() {
  std::string S;
  int N;
  std::cin >> N >> S;
  int cnt = 0;
  bool first = true;
  for (int i = 0; i < N; i++) {
    if (S[i] == '#' && first) {
      first = false;
    }
    if (S[i] == '.' && !first) {
      cnt++;
    }
  }
  std::cout << cnt << std::endl;
  return 0;
}
