#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  char S[N];
  for (int i = 0; i < N; i++) {
    cin >> S[i];
  }
  int cnt = 0;
  for (int i = 0; i < N; i++) {
    if (S[i] == '#') {
      cnt = i;
      break;
    }
  }
  int white = 0;
  for (int i = cnt; i < N; i++) {
    if (S[i] == '.') {
      white++;
    }
  }
  cout << white;
}
