





from __future__ import annotations

from statistics import mean





def   lowerCamelCase__       (       UpperCamelCase__     :    list[int]    ,      UpperCamelCase__     :    list[int]    ,      UpperCamelCase__     :    int  )     ->	list[int]:



					'''simple docstring'''




					_snake_case													=			[0] * no_of_processes
					_snake_case													=			[0] * no_of_processes

					# Initialize remaining_time to waiting_time.

					for i in range(_lowerCamelCase  ):
										_snake_case													=			burst_time[i]
					_snake_case													=			[]

					_snake_case													=			0
					_snake_case													=			0

					# When processes are not completed,
					# A process whose arrival time has passed \
					# and has remaining execution time is put into the ready_process.
					# The shortest process in the ready_process, target_process is executed.

					while completed != no_of_processes:
										_snake_case													=			[]
										_snake_case													=			-1

										for i in range(_lowerCamelCase  ):
															if (arrival_time[i] <= total_time) and (remaining_time[i] > 0):
																				ready_process.append(_lowerCamelCase  )

										if len(_lowerCamelCase  ) > 0:
															_snake_case													=			ready_process[0]
															for i in ready_process:
																				if remaining_time[i] < remaining_time[target_process]:
																									_snake_case													=			i
															total_time += burst_time[target_process]
															completed += 1
															_snake_case													=			0
															_snake_case													=			(
															    total_time - arrival_time[target_process] - burst_time[target_process]
															)
										else:
															total_time += 1

					return waiting_time





def   lowerCamelCase__       (       UpperCamelCase__     :    list[int]    ,      UpperCamelCase__     :    int    ,      UpperCamelCase__     :    list[int]  )     ->	list[int]:



					'''simple docstring'''




					_snake_case													=			[0] * no_of_processes
					for i in range(_lowerCamelCase  ):
										_snake_case													=			burst_time[i] + waiting_time[i]
					return turn_around_time


if __name__ == "__main__":
					print("""[TEST CASE 01]""")

					_lowercase 							=       4
					_lowercase 							=       [2, 5, 3, 7]
					_lowercase 							=       [0, 0, 0, 0]
					_lowercase 							=       calculate_waitingtime(arrival_time, burst_time, no_of_processes)
					_lowercase 							=       calculate_turnaroundtime(
					    burst_time, no_of_processes, waiting_time
					)

					# Printing the Result
					print("""PID\tBurst Time\tArrival Time\tWaiting Time\tTurnaround Time""")
					for i, process_id in enumerate(list(range(1, 5))):
										print(
										    F"{process_id}\t{burst_time[i]}\t\t\t{arrival_time[i]}\t\t\t\t"
										    F"{waiting_time[i]}\t\t\t\t{turn_around_time[i]}"
										)
					print(F"\nAverage waiting time = {mean(waiting_time):.5f}")
					print(F"Average turnaround time = {mean(turn_around_time):.5f}")










def   lowerCamelCase__       (       )     ->	int:



					'''simple docstring'''




					return 1





def   lowerCamelCase__       (       UpperCamelCase__     :    int  )     ->	int:



					'''simple docstring'''




					return 0 if x < 0 else two_pence(x - 2  ) + one_pence()





def   lowerCamelCase__       (       UpperCamelCase__     :    int  )     ->	int:



					'''simple docstring'''




					return 0 if x < 0 else five_pence(x - 5  ) + two_pence(UpperCamelCase__  )





def   lowerCamelCase__       (       UpperCamelCase__     :    int  )     ->	int:



					'''simple docstring'''




					return 0 if x < 0 else ten_pence(x - 10  ) + five_pence(UpperCamelCase__  )





def   lowerCamelCase__       (       UpperCamelCase__     :    int  )     ->	int:



					'''simple docstring'''




					return 0 if x < 0 else twenty_pence(x - 20  ) + ten_pence(UpperCamelCase__  )





def   lowerCamelCase__       (       UpperCamelCase__     :    int  )     ->	int:



					'''simple docstring'''




					return 0 if x < 0 else fifty_pence(x - 50  ) + twenty_pence(UpperCamelCase__  )





def   lowerCamelCase__       (       UpperCamelCase__     :    int  )     ->	int:



					'''simple docstring'''




					return 0 if x < 0 else one_pound(x - 100  ) + fifty_pence(UpperCamelCase__  )





def   lowerCamelCase__       (       UpperCamelCase__     :    int  )     ->	int:



					'''simple docstring'''




					return 0 if x < 0 else two_pound(x - 200  ) + one_pound(UpperCamelCase__  )





def   lowerCamelCase__       (       UpperCamelCase__     :    int = 200  )     ->	int:



					'''simple docstring'''




					return two_pound(UpperCamelCase__  )


if __name__ == "__main__":
					print(solution(int(input().strip())))



