#include <bits/stdc++.h>
using namespace std;
const int base = 1000000007;
int dp[100005][2];
string ss;
int c = 0;
long long int n;
int ans = 1000006;
int solve(string s, int i) {
  if (i == n - 1) {
    for (int i = 0; i < n; i++)
      if (s[i] != ss[i]) c++;
    if (c < ans) ans = c;
    return 0;
  }
  if (s[i] == '#' && s[i + 1] == '.')
    s[i + 1] = '#', solve(s, i + 1), s[i + 1] = '.';
  if (s[i] == '#' && s[i + 1] == '.') {
    s[i] = '.';
    solve(s, i + 1);
    s[i] = '#';
  } else
    solve(s, i + 1);
  return 0;
}
int main() {
  cin >> n >> ss;
  string s = ss;
  solve(s, 0);
  cout << ans;
}
