#include <bits/stdc++.h>
using namespace std;
int solve(string s) {
  int cnt = 0;
  for (int i = 1; i < s.length(); i++) {
    if (s[i - 1] == '#' and s[i] == '.') s[i] = '#', cnt++;
  }
  return cnt;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  string s;
  int a = solve(s);
  if (s[0] == '#')
    s[0] == '.';
  else
    s[0] = '#';
  int b = solve(s) + 1;
  cout << max(a, b) << endl;
}
