import java.util.*;


public class Solution {
    /**
     * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
     *
     * 
     * @param nums int整型一维数组 
     * @return int整型
     */
    public int findPeakElement (int[] nums) {
        // write code here
        int target = -1;
        for(int i=0;i<nums.length;i++){
            int last = - ((int)Math.pow(2,31) + 1);
            if(i-1 > -1){
                last = nums[i-1];
            }
            
            int current = nums[i];
            int next = - ((int)Math.pow(2,31) + 1);
            if(i+1 < nums.length){
                next = nums[i+1];
            }
            
            if(last < current && current > next){
                target = i;
                break;
            }
        }
        return target;
    }
}