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

# from sys import stdin
# stdin=open('input.txt')

# def input():
#   return stdin.readline()[:-1]


# from sys import stdout
# stdout=open('output.txt',mode='w+')

# def print1(x, end='\n'):
#   stdout.write(str(x) +end)


# a, b = map(int, input().split())

# l = list(map(int, input().split()))


# CODE BEGINS HERE.................


# import copy
# import math
# from sys import setrecursionlimit
# setrecursionlimit(10**7)
# from itertools import combinations 

T = 1
# T = int(input())

for t in range(T):
    # print('Case #' + str(t + 1) + ': ', end = '')
    n = int(input()) 
    s = input()
    wrong_red = 0
    wrong_black = 0
    for i in range(n):
        if ((i % 2 == 0) and (s[i] == 'r')):
            wrong_red += 1
        if ((i % 2 == 1) and (s[i] == 'b')):
            wrong_black += 1
    if wrong_black < wrong_red:
        total_moves = wrong_black + (wrong_red - wrong_black)
    else:
        total_moves = wrong_red + (wrong_black - wrong_red)


    wrong_red = 0
    wrong_black = 0
    for i in range(n):
        if ((i % 2 == 1) and (s[i] == 'r')):
            wrong_red += 1
        if ((i % 2 == 0) and (s[i] == 'b')):
            wrong_black += 1
    if wrong_black < wrong_red:
        total_moves = min(total_moves, wrong_black + (wrong_red - wrong_black))
    else:
        total_moves = min(total_moves, wrong_red + (wrong_black - wrong_red))

    print(total_moves)

# # CODE ENDS HERE....................
# stdout.close()

