func minimumBribes(q []int32) {
// Write your code here
bribes := 0
for i:=len(q)-1; i >= 0; i-- {
diff := int(q[i]) - (i+1)
if diff > 2 {
fmt.Println("Too chaotic")
return
}
for j:=int(math.Max(float64(0), float64(q[i]-2))); j < i; j++ {
if q[j] > q[i] {
bribes++
}
}
}
fmt.Println(bribes)
return
}