#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string a;
  int ans, flag = 0;
  cin >> n;
  cin >> a;
  for (int i = 0; i < n; i++) {
    if (flag) {
      if (a[i] == '.') ans++;
      flag = 0;
    }
    if (a[i] == '#') flag = 1;
  }
  cout << ans;
  return 0;
}
