#include <bits/stdc++.h>
using namespace std;
int main() {
  double length;
  cin >> length;
  string message;
  cin >> message;
  double ans = 0;
  double firstTarget = message.find_first_of("#");
  if (firstTarget >= 0) {
    for (double i = firstTarget; i < (double)message.length(); i++) {
      if (message.substr(i, 1) == ".") {
        ans++;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
