#include <bits/stdc++.h>
using ull = unsigned long long;
constexpr auto mod = 1000000007;
constexpr auto INF = ULLONG_MAX;
using namespace std;
template <typename T>
inline void dump(const T& x) {
  cout << "[" << x << "]" << endl;
}
template <typename T>
inline void dump(const vector<T>& x) {
  for (const auto v : x) {
    cout << v << " ";
  }
  cout << endl;
}
template <typename T>
inline void sort_asc(vector<T>& x) {
  std::sort(x.begin(), x.end());
}
template <typename T>
inline void sort_desc(vector<T>& x) {
  std::sort(x.begin(), x.end(), greater<T>());
}
template <typename T>
inline T max_value(vector<T>& x) {
  return *max_element(x.begin(), x.end());
}
template <typename T>
inline T min_value(vector<T>& x) {
  return *min_element(x.begin(), x.end());
}
template <typename T>
inline T sum_value(vector<T>& x) {
  return accumulate(x.begin(), x.end(), 0);
}
int main() {
  ull n;
  string s;
  cin >> n;
  cin >> s;
  auto first = s.find('#');
  if (first == string::npos) {
    cout << 0 << endl;
  } else {
    auto sdash = s.substr(first, s.size() - first);
    cout << count(sdash.begin(), sdash.end(), '.') << endl;
  }
  return 0;
}
