#include <bits/stdc++.h>
using namespace std;
const long double PI = acos(-1.0);
int main() {
  int N;
  string S;
  cin >> N >> S;
  int edge = 0, cnt = 0;
  for (long long i = 0; i < (long long)(N); i++) {
    if (S[i] == '.')
      edge++;
    else
      break;
  }
  for (long long i = edge; i <= (long long)(N - 1); i++)
    if (S[i] == '.') cnt++;
  cout << cnt << endl;
  return 0;
}
