#include <bits/stdc++.h>
using namespace std;
long long n;
char s[2 * 1000000];
int main() {
  cin >> n;
  for (long long i = (0); i < (n); ++i) {
    cin >> s[i];
  }
  bool flag = false;
  long long count = 0;
  for (long long i = (0); i < (n); ++i) {
    if (!flag) {
      if (s[i] == '.') {
        continue;
      }
      flag = true;
    }
    if (s[i] == '.') {
      count++;
    }
  }
  cout << count << endl;
}
