#include <bits/stdc++.h>
using namespace std;
int vis[50005];
char a[50005];
int n;
int ans;
void dfs(int x) {
  vis[x] = 1;
  if (a[x - 1] == '.' && vis[x - 1] == 0) dfs(x - 1);
  if (a[x + 1] == '.' && vis[x + 1] == 0) dfs(x + 1);
}
int main() {
  memset(vis, 0, sizeof(vis));
  memset(a, '#', sizeof(a));
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  ans = 0;
  for (int i = 1; i <= n; i++) {
    if (vis[i] == 0 && a[i] == '.') {
      dfs(i);
      ans++;
    }
  }
  cout << ans << endl;
  return 0;
}
