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