#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long INF = 1000000000;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int ans = 0;
  bool flag = (s[0] == '.');
  for (int i = 0; i < n; ++i) {
    if (s[i] == '#') flag = false;
    ans += (!flag && s[i] == '.');
  }
  cout << ans << endl;
  return 0;
}
