#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e6 + 5;
int n;
void change(char &a) {
  if (a == '*') {
    a = '#';
  } else if (a == '#') {
    a = '.';
  }
}
int dfs(int pos, int ans, char s[]) {
  if (pos == n) {
    return ans;
  }
  if (s[pos - 1] == '#' && s[pos] == '.' && pos >= 1) {
    return INT_MAX;
  }
  int ac = dfs(pos + 1, ans, s);
  change(s[pos]);
  int an = dfs(pos + 1, ans + 1, s);
  return min(ac, an);
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  char s[maxn] = {0};
  cin >> n;
  cin >> s;
  cout << dfs(0, 0, s) << endl;
  return 0;
}
