#include <bits/stdc++.h>
using namespace std;
int inputValue() {
  int a;
  cin >> a;
  return a;
};
void inputArray(int* p, int a) {
  for (int i = (0); i < (a); i++) {
    cin >> p[i];
  }
};
void inputVector(vector<int>* p, int a) {
  for (int i = (0); i < (a); i++) {
    int input;
    cin >> input;
    p->push_back(input);
  }
}
template <typename T>
void output(T a, int precision) {
  if (precision > 0) {
    cout << setprecision(precision) << a << "\n";
  } else {
    cout << a << "\n";
  }
}
int main(int argc, const char* argv[]) {
  int N;
  cin >> N;
  string S;
  cin >> S;
  int counter = 0;
  int tempWhiteCounter = 0;
  for (int i = (0); i < (N); i++) {
    string target = S.substr(N - i - 1, 1);
    if (target == ".") {
      tempWhiteCounter++;
    } else {
      counter += tempWhiteCounter;
      tempWhiteCounter = 0;
    }
  }
  cout << counter << endl;
  return 0;
}
