public class Great_ocen {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int num = sc.nextInt();
		int lookAble = 1;
		String str = sc.next();
		List<Integer> array = new ArrayList<Integer>();

		for(int i = 0;i < num; i++) {
			array.add(Integer.valueOf(str.charAt(i)));
		}


		for(int j = 0; j < num -1 ;j++) {
			int compare = array.get(j).compareTo(array.get(j + 1));
			if(compare == -1) {
				lookAble += 1;
			}
		}

		System.out.println(lookAble);
	}
}