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