cases = int(input())
for case in cases:
    N = int(input())
    heights = list(map(int, input().split()))
    peaks = 0
    for i in range(1,len(heights)-1):
        if heights[i] > heights[i+1] and heights[i] > heights[i-1]:
            peaks += 1
    print('Case #' + str(case) + ": " + str(peaks))

385e0d5c25e05c47712dbd2821ffef2841f9c119
<mask token>

<mask token>
for case in cases:
    N = int(input())
    heights = list(map(int, input().split()))
    peaks = 0
    for i in range(1, len(heights) - 1):
        if heights[i] > heights[i + 1] and heights[i] > heights[i - 1]:
            peaks += 1
    print('Case #' + str(case) + ': ' + str(peaks))

cases = int(input())
for case in cases:
    N = int(input())
    heights = list(map(int, input().split()))
    peaks = 0
    for i in range(1, len(heights) - 1):
        if heights[i] > heights[i + 1] and heights[i] > heights[i - 1]:
            peaks += 1
    print('Case #' + str(case) + ': ' + str(peaks))

cases = int(input())
for case in cases:
    N = int(input())
    heights = list(map(int, input().split()))
    peaks = 0
    for i in range(1,len(heights)-1):
        if heights[i] > heights[i+1] and heights[i] > heights[i-1]:
            peaks += 1
    print('Case #' + str(case) + ": " + str(peaks))
