#include <bits/stdc++.h>
using namespace std;
template <typename T>
T mod(T a, T b) {
  return (a + b) % b;
}
template <typename T>
T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
map<long long, long long> factor(long long n) {
  map<long long, long long> mp;
  for (long long i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      mp[i]++;
      n /= i;
    }
  }
  if (n > 1) {
    mp[n]++;
  }
  return mp;
}
void solve() {
  long long N;
  cin >> N;
  string S;
  cin >> S;
  int x = N + 1;
  for (int i = 0; i < N; i++) {
    if (S[i] == '#') {
      x = i;
      break;
    }
  }
  long long ans = 0;
  for (int i = x + 1; i < N; i++) {
    if (S[i] == '.') {
      ans++;
    }
  }
  cout << ans << endl;
  return;
}
int main(int argc, char const* argv[]) {
  solve();
  return 0;
}
