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