n = gets.to_i s = gets.chomp puts s.gsub('CPCTCPC', 'CPCTF').scan('CPCTF').size