#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int ans = 0;
  int f = 0;
  for (int i = 0; i < n; i++) {
    if (f == 0) {
      if (s.at(i) == '#') {
        f = 1;
      }
    } else {
      if (s.at(i) == '.') {
        ans++;
      }
    }
  }
  cout << ans << endl;
}
