#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  int count = 0;
  bool all = true;
  cin >> n;
  cin >> s;
  for (int i = 0; i < n; i++) {
    if (s[i] == '#') all = false;
    if (s[i] == '.' && !(all)) count++;
  }
  cout << count << endl;
  return 0;
}
