#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  string S;
  cin >> N >> S;
  int index = S.find('#');
  if (index == string::npos) {
    cout << 0 << endl;
    return 0;
  }
  int ans = 0;
  for (int i = index; i < N; i++) {
    if (S[i] == '.') {
      ans++;
    } else {
    }
  }
  cout << ans << endl;
}
