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.util.*;
import java.io.*;

public class Cockroach {

  static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

  public static void main(String[] args) throws IOException {

    int n = Integer.valueOf(br.readLine());
    String str = br.readLine();

    int first = min(str.toCharArray(), new char[]{'r', 'b'});
    int second = min(str.toCharArray(), new char[]{'b', 'r'});
    System.out.println(first + " " + second);
    System.out.println(Math.min(first, second));

  }

  static int min(char[] arr, char[] order) {

    int[] outOfPlace = new int[2];
    for (int i = 0; i < arr.length; i++) {
      if (arr[i] != order[i % 2])
        outOfPlace[i % 2]++;
    }

    return Math.max(outOfPlace[0], outOfPlace[1]);

  }

}