#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int zer = 0, one = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '.')
      zer++;
    else
      one++;
  }
  int corr = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] = '.')
      corr++;
    else
      break;
  }
  if (one)
    cout << zer - corr << "\n";
  else
    cout << 0 << "\n";
}
