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