13

Benchmark and slightly improved versions of some solutions.
Congratulations, in the worst case (a = list(range(1, 10**5 + 1))) your original solution is about 2-4.5 times faster than the solutions in the previous answers:
5.45 ms 5.46 ms 5.43 ms original
4.58 ms 4.57 ms 4.57 ms origin...