package main
import "fmt"
func main() {
var numLen, nums, count, numMin int
fmt.Scan(&numLen)
fmt.Scan(&numMin)
count = 1
for i := 1; i < numLen; i++ {
fmt.Scan(&nums)
if nums < numMin {
numMin = nums
count = 1
} else if nums == numMin {
count++
}
}
fmt.Println(count)
}