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

#!/usr/bin/env python

"""This script is a solution for B problem Codeforces round 373"""

def main():
    """Main function"""
    n = int(input())
    l = raw_input()

    wrong_red_1 = sum(1 for x in l[::2] if x == "b")
    wrong_black_1 = sum(1 for x in l[1::2] if x == "r")
    wrong_red_2 = sum(1 for x in l[1::2] if x == "b")
    wrong_black_2 = sum(1 for x in l[::2] if x == "r")

    cost1 = min(wrong_red_1, wrong_black_1) + max(wrong_red_1, wrong_black_1) - min(wrong_red_1, wrong_black_1)
    cost2 = min(wrong_red_2, wrong_black_2) + max(wrong_red_2, wrong_black_2) - min(wrong_red_2, wrong_black_2)

    print min(cost1, cost2)



if __name__ == '__main__':
    main()
