package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

// 文字列を1行入力
func StrStdin() (stringInput string) {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	stringInput = scanner.Text()
	return
}

func main() {
	//var num int
	input := strings.Split(StrStdin(), " ")
	slice := make([]int, len(input))
	for i, j := range input {
		slice[i], _ = strconv.Atoi(j)
		//fmt.Printf("%d\n", slice[i])
	}

	var ng int
	for i := 0; i < len(input)-1; i++ {
		for j := i + 1; j < len(input); j++ {
			if slice[i] > slice[j] {
				ng++
				break
			}
		}
	}
	fmt.Println(len(input) - ng)
}
