#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int N, point;
  string S;
  int ans = 0;
  cin >> N;
  cin >> S;
  bool flg = true;
  for (int i = 0; i < N; i++) {
    if (S[i] == '#') {
      point = i;
      flg = false;
    }
  }
  if (flg) {
    cout << 0 << endl;
    return 0;
  }
  for (int i = point; i < N; i++) {
    if (S[i] = '.') {
      ans++;
    }
  }
  cout << ans << endl;
  return 0;
}
