Submission

Status:

[PPPx][P][P][P][P]

Subtask/Task Score:

{0/20}{20/20}{20/20}{20/20}{20/20}

Score: 80

User: ryu

Problemset: นก

Language: python

Time: 0.011 second

Submitted On: 2025-12-03 22:59:14

# -*- coding: utf-8 -*-
"""Untitled1.ipynb

Automatically generated by Colab.

Original file is located at
    https://colab.research.google.com/drive/1s5zK7zFybL04sCJLS56tjTEu-vtVy_A7
"""

n=(int(input()))
a=list(map(int,input().split())) #input is the fuction that input string. split is to seperate inut by space map is fuction that change type of input form string to integer and change it to list
count = 0
if a[0] > a[1]:
  count += 1
for i in range(1,n-1):
  if a[i] > a[i-1] and a[i]>a[i+1]:
    count += 1
if a[n-1]>a[n-2]:
  count += 1
print(count)