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