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