#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long A = 0, B = 0, C, N, K;
  string S, W, T;
  cin >> N >> S;
  for (long long i = 0; i < N; i++) {
    if (S.at(i) == '.' && B == 0) {
      for (long long j = i; j < N; j++) {
        if (S.at(j) == '#') {
          B += 1;
        }
      }
    }
  }
  cout << B << endl;
}
