'use strict'
function main(input) {
  let result = input.trim().split('\n')[1].match(/\#(\.+)/g)
  result = result ? result.join('').match(/\./g).length : 0;
  console.log(result)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
