L - AI robots

Languages: C++, Java, Python, Kotlin
Time & Memory limits: (details)

Input

Output

Sample test(s)

Input
3 2 3 6 1 7 3 10 10 5 8
Output
1

Hints