#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, ans = 0;
  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) == '.') {
          ans++;
        }
      }
      cout << ans << endl;
      break;
    }
    if (i == s.size() - 1) {
      cout << 0 << endl;
      break;
    }
  }
}
