





'''simple docstring'''







# This code is adapted from OpenAI's release
# https://github.com/openai/human-eval/blob/master/human_eval/execution.py

import contextlib
import faulthandler
import io
import multiprocessing
import os
import platform
import signal
import tempfile






def  _lowerCamelCase				( lowercase						:      int    ,							lowercase						:      Dict    ,							lowercase						:      Optional[Any]    ,							lowercase						:      List[str]						)	->	List[str]:
				_a								= multiprocessing.Manager()
				_a								= manager.list()

				_a								= multiprocessing.Process(target=lowercase    ,							args=(check_program, result, timeout)						)
				p.start()
				p.join(timeout=timeout + 1						)
				if p.is_alive():
								p.kill()

				if not result:
								result.append("timed out"						)

				return {
				    "task_id": task_id,
				    "passed": result[0] == "passed",
				    "result": result[0],
				    "completion_id": completion_id,
				}






def  _lowerCamelCase				( lowercase						:      int    ,							lowercase						:      List[str]    ,							lowercase						:      List[Any]						)	->	Dict:
				with create_tempdir():
								# These system calls are needed when cleaning up tempdir.
								import os
								import shutil

								_a								= shutil.rmtree
								_a								= os.rmdir
								_a								= os.chdir

								# Disable functionalities that can make destructive changes to the test.
								reliability_guard()

								# Run program.
								try:
												_a								= {}
												with swallow_io():
																with time_limit(lowercase						):
																				exec(lowercase    ,							lowercase						)
												result.append("passed"						)
								except TimeoutException:
												result.append("timed out"						)
								except BaseException as e:
												result.append(F'failed: {e}'						)

								# Needed for cleaning up.
								_a								= rmtree
								_a								= rmdir
								_a								= chdir






@contextlib.contextmanager
def  _lowerCamelCase				( lowercase						:      int						)	->	Dict:
				def signal_handler(lowercase						:      Any    ,							lowercase						:      Tuple						):
								raise TimeoutException("Timed out!"						)

				signal.setitimer(signal.ITIMER_REAL    ,							lowercase						)
				signal.signal(signal.SIGALRM    ,							lowercase						)
				try:
								yield
				finally:
								signal.setitimer(signal.ITIMER_REAL    ,							0						)






@contextlib.contextmanager
def  _lowerCamelCase				( )	->	Any:
				_a								= WriteOnlyStringIO()
				with contextlib.redirect_stdout(lowercase						):
								with contextlib.redirect_stderr(lowercase						):
												with redirect_stdin(lowercase						):
																yield






@contextlib.contextmanager
def  _lowerCamelCase				( )	->	int:
				with tempfile.TemporaryDirectory() as dirname:
								with chdir(lowercase						):
												yield dirname
class 				__SCREAMING_SNAKE_CASE  (lowerCamelCase_      ):






				"""simple docstring"""







				pass


class 				__SCREAMING_SNAKE_CASE  (io.StringIO      ):






				"""simple docstring"""







				def   UpperCamelCase__   (  self     :					int					,				*__a     :					Union[str, Any]					,				**__a     :					Dict					):
								raise OSError




				def   UpperCamelCase__   (  self     :					Tuple					,				*__a     :					int					,				**__a     :					Optional[int]					):
								raise OSError




				def   UpperCamelCase__   (  self     :					Optional[Any]					,				*__a     :					List[str]					,				**__a     :					int					):
								raise OSError




				def   UpperCamelCase__   (  self     :					Union[str, Any]					,				*__a     :					int					,				**__a     :					int					):
								return False


class 				__SCREAMING_SNAKE_CASE  (contextlib._RedirectStream      ):  # type: ignore






				"""simple docstring"""







				__a            ='stdin'






@contextlib.contextmanager
def  _lowerCamelCase				( lowercase						:      List[str]						)	->	Dict:
				if root == ".":
								yield
								return
				_a								= os.getcwd()
				os.chdir(lowercase						)
				try:
								yield
				except BaseException as exc:
								raise exc
				finally:
								os.chdir(lowercase						)






def  _lowerCamelCase				( lowercase						:      Dict=None						)	->	Optional[int]:

				if maximum_memory_bytes is not None:
								import resource

								resource.setrlimit(resource.RLIMIT_AS    ,							(maximum_memory_bytes, maximum_memory_bytes)						)
								resource.setrlimit(resource.RLIMIT_DATA    ,							(maximum_memory_bytes, maximum_memory_bytes)						)
								if not platform.uname().system == "Darwin":
												resource.setrlimit(resource.RLIMIT_STACK    ,							(maximum_memory_bytes, maximum_memory_bytes)						)

				faulthandler.disable()

				import builtins

				_a								= None
				_a								= None

				import os

				_a								= "1"

				_a								= None
				_a								= None
				_a								= None
				_a								= None
				_a								= None
				_a								= None
				_a								= None
				_a								= None
				_a								= None
				_a								= None
				_a								= None
				_a								= None
				_a								= None
				_a								= None
				_a								= None
				_a								= None
				_a								= None
				_a								= None
				_a								= None
				_a								= None
				_a								= None
				_a								= None
				_a								= None
				_a								= None
				_a								= None
				_a								= None
				_a								= None

				import shutil

				_a								= None
				_a								= None
				_a								= None

				import subprocess

				_a								= None  # type: ignore

				_a								= None

				import sys

				_a								= None
				_a								= None
				_a								= None
				_a								= None
				_a								= None


import os
from math import logaa






def 							_lowercase							(     UpperCamelCase_ = "base_exp.txt"		)		->		int:
					'''simple docstring'''


					SCREAMING_SNAKE_CASE__													= 0
					SCREAMING_SNAKE_CASE__													= 0
					for i, line in enumerate(open(os.path.join(os.path.dirname(UpperCamelCase_		)	,	UpperCamelCase_		)		)		):
										SCREAMING_SNAKE_CASE__						, SCREAMING_SNAKE_CASE__													= list(map(UpperCamelCase_	,	line.split(','		)		)		)
										if x * logaa(UpperCamelCase_		) > largest:
															SCREAMING_SNAKE_CASE__													= x * logaa(UpperCamelCase_		)
															SCREAMING_SNAKE_CASE__													= i + 1
					return result


if __name__ == "__main__":
				print(solution())





