#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T = ll>
inline T in() {
  T ret;
  cin >> ret;
  return ret;
}
int main() {
  ll n = in();
  string s;
  cin >> s;
  auto fb = s.find_first_of('#');
  if (fb == string::npos)
    cout << 0 << endl;
  else
    cout << count(s.begin() + fb, s.end(), '.') << endl;
}
