public class stringtest {
	public static void main(String[] args){
		String str = "nbaskjnabsdjnbaio";
		int k = 0;
		int a = 0;
		while(a!=-1){
			a = str.indexOf("nba",a);
			if(a!=-1){
			k++;
			a+=3;
			}
		}
		System.out.println(k);
	}
}