function Main( input ){

	var t = input.split( '\n' ),
			arr = t[ 1 ].split( '' ),
			c = 0;

	var i = 0, l = t[ 0 ];
	for( ; i < l; i = ( i + 1 )|0 ){
		if( arr[ i ] !== arr[ i + 1 ] ) c = ( c + 1 )|0;
	}

	console.log( c );
	
}

Main( require( 'fs' ).readFileSync( '/dev/stdin', 'utf8' ) );