arr = [5.2, 3.1, 7.8, 6.5, 4.3]
k = 0  
indices = []  

for i in range(len(arr) - 1):
    if arr[i] > arr[i + 1]:
        k += 1
        indices.append(i)

print("Indices of numbers greater than their right neighbor:", indices)
print("The number K of such numbers:", k)