#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, counter = 0;
  string S;
  cin >> N >> S;
  if (S[0] == '#') {
    for (int i = 0; i < N; i++) {
      if (S[i] == '.') {
        counter++;
      }
    }
  } else {
    for (int i = 0; i < N; i++) {
      if (S[i] == '#') {
        for (int j = i; j < N; j++) {
          if (S[j] == '.') {
            counter++;
          }
        }
        break;
      }
    }
  }
  cout << counter << endl;
  return 0;
}
