import strutils, sequtils var N, a = stdin.readLine.split.map parseInt cnt, ttl = 0 while true: cnt = a[0] a.delete 0 if a.len == 0: break elif a[0] < cnt: ttl += 1 echo ttl