#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  string S;
  cin >> N >> S;
  S += "###";
  bool flag = false;
  bool flag2 = false;
  int cnt = 0;
  int cnt2 = 0;
  for (int i = 0; i < N; i++) {
    if (S[i] == '#') {
      while (i < N && S[i] == '#') i++;
      i++;
      cnt++;
    }
  }
  cout << cnt << endl;
}
