#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  char hold_1, shape = '#', dot = '.';
  string S;
  cin >> N >> S;
  int ans = S.size();
  int cnt = 0;
  hold_1 == S[0];
  for (int i = 0; i < N; i++) {
    if (i > 0) {
      if (S[i - 1] == shape && S[i] == dot) cnt++;
    }
  }
  ans = min(ans, cnt);
  cout << ans << endl;
  return 0;
}
