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