166
rbbbbbbbbbbbbrbrrbbrbbbrbbbbbbbbbbrbbbbbbrbbbrbbbbbrbbbbbbbrbbbbbbbrbbrbbbbbbbbrbbbbbbbbbbbbbbrrbbbrbbbbbbbbbbbbbbrbrbbbbbbbbbbbrbbbbbbbbbbbbbbrbbbbbbbbbbbbbbbbbbbbbb
 7
rrbrbrb
 1
r
 2
bb
 18
rrrrrrrrrrrrrrrrrb
 8
rbbrbrbr
 1
b
 13
rbbbrbrrbrrbb
 100
brbbbrrrbbrbrbbrbbrbbbbrbbrrbbbrrbbbbrbrbbbbbbbbbbbbbbbbrrrrbbbbrrrbbbbbbbrbrrbrbbbbrrrbbbbrbbrbbbrb
 2
rb
 2
rr
 2
br

70
 1
 0
 1
 8
 1
 0
 3
 34
 0
 1
 0

import java.io.*;
import java.math.BigInteger;
import java.util.*;
import java.text.DecimalFormat;
public class B {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		String s = scan.next();
		char[] c = s.toCharArray();
		char[] cc = s.toCharArray();
		char[] ccc = s.toCharArray();
		int needb = 0,needr = 0;
		for(int i = 1;i<n;i++){
			if(cc[i]==cc[i-1]){
				if(cc[i]=='r'){
					needb++;
					cc[i] = 'b';
				}else{
					needr++;
					cc[i] = 'r';
				}
			}	
		}
		int ans1 = Math.max(needb, needr);
		needb = 0;needr = 0;
		if(cc[0]=='b'){
			ccc[0] = 'r';
			needr++;
		}
		else {
			ccc[0] = 'b';
			needb++;
		}
		
		for(int i = 1;i<n;i++){
			if(ccc[i]==ccc[i-1]){
				if(cc[i]=='r'){
					needb++;
					ccc[i] = 'b';
				}else{
					needr++;
					ccc[i] = 'r';
				}
			}	
		}
		int ans2 = Math.max(needb, needr);
		int ans = Math.min(ans1,ans2);
		System.out.println(ans1);System.out.println(ans2);
		System.out.println(ans);
	}
}