#include <bits/stdc++.h>
using namespace std;
using namespace std::chrono;
long double PI = 3.14159265358979323846;
using ll = long long;
const ll modo = 1e9 + 7;
const ll inf = 1e17;
const ll ms = (5e5) + 5;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  int n;
  cin >> n;
  int i;
  int a = 0;
  int f = 0;
  char e;
  for (i = 1; i <= n; i++) {
    cin >> e;
    if (e == '.') {
      if (f) a++;
    } else
      f = 1;
  }
  cout << a;
  return 0;
}
