#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
int main() {
  int N;
  string S;
  cin >> N;
  cin >> S;
  size_t pos = -1;
  ll cnt = 0;
  while (true) {
    pos = S.find("#.", pos + 1);
    if (pos != string::npos) {
      cnt++;
    } else {
      break;
    }
  }
  cout << cnt;
  return 0;
}
