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