#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  string S;
  cin >> S;
  int ans = 0, cnt = 0;
  for (int i = N - 1; i >= 0; --i) {
    if (S[i] == '.') {
      ++cnt;
    } else {
      ans += cnt;
      cnt = 0;
    }
  }
  cout << ans << endl;
}
