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