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