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 logging
import copy
import sys
import math

logging.basicConfig(stream=sys.stderr, level=logging.DEBUG)

#def solve(firstLine):
def solve(line):
    length = len(line)
    if length < 2:
        return 0

    diff = [0,0]
    color = [line[0], 'b']
    if line[0] == 'r':
        color[1] = 'b'
    else:
        color[1] = 'r'

    for i, c in enumerate(line):
        idx = i % 2
        if c != color[idx]:
            diff[idx]+=1

    return max(diff)
    

def main():
    firstLine = int(input())
    line = input()
    print(solve(line))
    

def log(*message):
    logging.debug(message)
    
if __name__ == "__main__":
    main()

