function Main(input){
  
  var str = input.trim().split("\n");
  var n = parseInt(str[0],10);
  var s = str[1];

  var targetStr = "#." ;

   //console.log( ( s.match( new RegExp( targetStr, "g" ) ) || [] ).length);

  var a =  ( s.match( new RegExp( targetStr, "g" ) ) || [] ).length ;
  

  
  var checks = s.replace(/\#\./g,"##");
  
  //console.log(checks);
  
  if(checks.substr(-2) == "#."){
    
    a++;
  }
  
console.log(a);
  
  
}//function end
 
Main(require("fs").readFileSync("/dev/stdin", "utf8"));