#include<stdio.h>
#include<iostream>
using namespace std;
int main(){
  int n=0,i=0,j=0,count1=0,count2=0,s=0;
  char a[100100]={};
  char maru='o',batu='x';
  cin>>n;
  scanf("%s",a);
  for(i=0;i<n;i++){
    if(a[i]==maru){
      count1++;
      count2=0;
      s++;
    }
    if(a[i]==batu){
      count2++;
      count1=0;
      if(count2==2)break;
      s++;
    }
  }
  cout<<s<<endl;
  return 0;
}