l=[int(x.strip())for x in open("input.txt")];print(sum(b>a for a,b in zip(l[:-3],l[3:])))