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