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