#include <bits/stdc++.h>
using namespace std;
long long MOD = 1000000000 + 7;
int main() {
  cout << setprecision(10);
  int N;
  cin >> N;
  string S;
  cin >> S;
  int ans = 0;
  for (int i = 1; i < S.size(); i++) {
    if (S[i] == '.') {
      if (S[i - 1] == '#') {
        ans++;
        S[i] = '#';
      }
    }
  }
  cout << ans << endl;
}
