package main import ( "fmt" ) func main() { var N int var arr [100000]int fmt.Scan(&N) for i := 0; i < N; i++ { fmt.Scan(&arr[i]) } ret := 0 x := arr[0] for i := 1; i < N; i++ { if x > arr[i] { ret++ } if x < arr[i] { x = arr[i] } } fmt.Println(ret) }