#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-10;
const double PI = acos(-1.0);
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N;
  string S;
  cin >> N;
  cin >> S;
  int ans = 0;
  bool flag = false;
  for (typeof((S).begin()) i = (S).begin(); i != (S).end(); ++i) {
    if (*i == '#') flag = true;
    if (*i == '.') {
      if (flag) ans++;
      flag = false;
    }
  }
  cout << ans << endl;
  return 0;
}
