#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  string s;
  int n;
  cin >> n >> s;
  int count = 0;
  ll count1 = 0;
  for (int i = 0; i < n; i++) {
    if (count == 0) {
      if (s[i] == '#') count = 1;
    } else {
      if (s[i] == '.') count1++;
    }
  }
  cout << count1 << endl;
}
