#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, f = 0, ans = 0, w = 0, b = 0;
  string s;
  cin >> n >> s;
  for (int i = 0; i < n; i++)
    if (s[i] == '.') {
      f = i;
      break;
    }
  for (int i = f; i < n; i++) {
    if (s[i] == '.')
      w++;
    else
      b++;
  }
  if (b == 0)
    cout << "0" << endl;
  else {
    cout << w << endl;
  }
  return 0;
}
