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.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;

// 37
public class Main 
{
	private static Reader r;

	public static void main(String[] args)
	throws Exception
	{
		r = new Reader();

		r.readLine();
		int n = r.readInt(0);

		r.readLine();
		String str = r.readString(0);

		int ans1,cr,cb,min;
		cr = cb = ans1 = 0;

		for (int i=0;i < n;++i)
		{
			if (i % 2 == 0)
			{
				if (str.charAt(i) != 'r')
					++cr;

			}
			else
			{
				if (str.charAt(i) != 'b')
					++cb;
			}
		}
		
		min = Math.min(cr, cb);
		ans1 += min;
		cr -= min;
		cb -= min;
		ans1 += cr+cb;
		
		int ans2;
		cr = cb = ans2 = 0;

		for (int i=0;i < n;++i)
		{
			if (i % 2 == 0)
			{
				if (str.charAt(i) != 'b')
					++cb;

			}
			else
			{
				if (str.charAt(i) != 'r')
					++cr;
			}
		}

		min = Math.min(cr, cb);
		ans2 += min;
		cr -= min;
		cb -= min;
		ans2 += cr+cb;
		
		System.out.println(Math.min(ans1,ans2));

		r.close();
	}

}

class Pair implements Comparable<Pair>
{
	int f,s;

	public Pair()
	{}

	public Pair(int f, int s)
	{
		this.f = f;
		this.s = s;
	}

	@Override
	public String toString()
	{
		return f + " " + s;
	}

	@Override
	public int compareTo(Pair o)
	{
		// TODO: Implement this method
		if (f == o.f)
			return s - o.s;
		return f - o.f;
	}
}

class Reader
{
	private BufferedReader reader;
	private String line[];

	public Reader()
	{
		reader = new BufferedReader(
			new InputStreamReader(System.in));
	}

	public String[] getLine()
	{
		return line;
	}

	public void readLine()
	throws IOException
	{
		line = reader.readLine().split(" ");
	}

	public int readInt(int pos)
	throws IOException
	{
		return Integer.parseInt(line[pos]);
	}

	public double readDouble(int pos)
	throws IOException
	{
		return Double.parseDouble(line[pos]);
	}

	public long readLong(int pos)
	throws IOException
	{
		return Long.parseLong(line[pos]);
	}

	public String readString(int pos)
	throws IOException
	{
		return line[pos];
	}

	public void close()
	throws IOException
	{
		reader.close();
	}
}