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