#include <bits/stdc++.h>
namespace tools {
template <typename T>
void read(std::vector<T>& vector,
          const typename std::vector<T>::size_type size) {
  vector.reserve(size);
  std::copy_n(std::istream_iterator<T>(std::cin), size,
              std::back_inserter(vector));
}
template <typename T, std::size_t N>
void read(std::array<T, N>& array) {
  std::copy_n(std::istream_iterator<T>(std::cin), N, array.begin());
}
}  // namespace tools
int main() {
  std::int_fast64_t N;
  std::string S;
  std::cin >> N >> S;
  std::int_fast64_t i;
  for (i = 0; i < N && S[i] == '.'; ++i)
    ;
  std::int_fast64_t answer = 0;
  for (; i < N; ++i) {
    if (S[i] == '.') ++answer;
  }
  std::cout << answer << std::endl;
  return 0;
}
