#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  string S;
  cin >> N >> S;
  int ans = 0;
  for (int i = 0; i < (int)(N); i++) {
    if (S[i] == '.') continue;
    if (S[i + 1] == '.') {
      if (i + 2 > N - 1) {
        ans++;
        break;
      }
      if (S[i + 2] == '.')
        ans++;
      else {
        S[i + 1] = '#';
        ans++;
      }
    }
  }
  cout << ans << endl;
}
