#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18 + 7;
const long long mod = 1e9 + 7;
int main() {
  int n;
  string s;
  cin >> n >> s;
  int ans = 0;
  for (long long i = 0; i < (long long)(n - 1); i++) {
    string S = s.substr(i, 2);
    if (S == "#.") ans++;
  }
  cout << ans << endl;
}
