#include <bits/stdc++.h>
using namespace std;
int main() {
  long long count1 = 0, N;
  string S;
  cin >> N >> S;
  for (long long i = 0; i < N; i++) {
    if (S.at(i) == '#') {
      for (long long j = i; j < N; j++) {
        if (S.at(j) == '.') {
          count1++;
        }
      }
      break;
    }
  }
  cout << count1;
}
