optimized codeeval36