def avg_calc(times):
	"""Calculate average of 5 for a given list of times

	Args:
		times (list): List of times, in seconds

	Returns:
		float or str: AO5 score or DNF
	"""
	dnf_counter = 0
	conv_times = []
	
	for i in times:
		if i.upper() == "DNF":
			dnf_counter += 1
			continue
		elif i == "":
			dnf_counter += 1
			continue
		conv_times.append(float(i))
	
	# If there are 2 or more DNFs, return DNF
	# Regulation 9f9
	if dnf_counter >= 2:
		return("DNF")

	# Sum all the times
	temp = sum(conv_times)

	# If all times present, subtract best and worst
	if len(conv_times)==5 :
		tt = temp - max(conv_times) - min(conv_times)
		return round(tt/3.0,2)

	# If one attempt is DNF, subtract only the best (as DNF is the worst)
	elif len(conv_times)==4 :
		tt = temp - min(conv_times)
		return round(tt/3.0,2)