


'''simple docstring'''




from random import randint, random





def 	a_					( lowerCamelCase	:     Optional[int]	, lowerCamelCase	:     Optional[int]	, lowerCamelCase	:     Union[str, Any]	, lowerCamelCase	:     Dict = False	, lowerCamelCase	:     List[Any] = False	, lowerCamelCase	:     Union[str, Any] = 5	, ):
   lowerCAmelCase     =			[[-1] * number_of_cells]  # Create a highway without any car
   lowerCAmelCase     =			0
   lowerCAmelCase     =			max(_A	, 0				)
   while i < number_of_cells:
      lowerCAmelCase     =			(
          randint(0	, _A				) if random_speed else initial_speed
      )  # Place the cars
      i += (
          randint(1	, max_speed * 2				) if random_frequency else frequency
      )  # Arbitrary number, may need tuning
   return highway





def 	a_					( lowerCamelCase	:     Optional[Any]	, lowerCamelCase	:     List[str]				):
   lowerCAmelCase     =			0
   lowerCAmelCase     =			highway_now[car_index + 1 :]
   for cell in range(len(_A				)				):  # May need a better name for this
      if cells[cell] != -1:  # If the cell is not empty then
         return distance  # we have the distance we wanted
      distance += 1
   # Here if the car is near the end of the highway
   return distance + get_distance(_A	, -1				)





def 	a_					( lowerCamelCase	:     List[Any]	, lowerCamelCase	:     Union[str, Any]	, lowerCamelCase	:     List[str]				):
   lowerCAmelCase     =			len(_A				)
   # Beforce calculations, the highway is empty
   lowerCAmelCase     =			[-1] * number_of_cells

   for car_index in range(_A				):
      if highway_now[car_index] != -1:
         # Add 1 to the current speed of the car and cap the speed
         lowerCAmelCase     =			min(highway_now[car_index] + 1	, _A				)
         # Number of empty cell before the next car
         lowerCAmelCase     =			get_distance(_A	, _A				) - 1
         # We can't have the car causing an accident
         lowerCAmelCase     =			min(next_highway[car_index]	, _A				)
         if random() < probability:
            # Randomly, a driver will slow down
            lowerCAmelCase     =			max(next_highway[car_index] - 1	, 0				)
   return next_highway





def 	a_					( lowerCamelCase	:     List[str]	, lowerCamelCase	:     int	, lowerCamelCase	:     Tuple	, lowerCamelCase	:     Optional[Any]				):
   lowerCAmelCase     =			len(highway[0]				)

   for i in range(_A				):
      lowerCAmelCase     =			update(highway[i]	, _A	, _A				)
      lowerCAmelCase     =			[-1] * number_of_cells

      for car_index in range(_A				):
         lowerCAmelCase     =			next_speeds_calculated[car_index]
         if speed != -1:
            # Change the position based on the speed (with % to create the loop)
            lowerCAmelCase     =			(car_index + speed) % number_of_cells
            # Commit the change of position
            lowerCAmelCase     =			speed
      highway.append(_A				)

   return highway


if __name__ == "__main__":
       import doctest

       doctest.testmod()











def 						lowerCamelCase__    (		):







	'''simple docstring'''





	snake_case_		    =     []
	snake_case_		    =     1

	while len(_A							) < 1E6:
		constant.append(str(_A							)							)
		i += 1

	snake_case_		    =     "".join(_A							)

	return (
	    int(constant[0]							)
	    * int(constant[9]							)
	    * int(constant[99]							)
	    * int(constant[999]							)
	    * int(constant[9999]							)
	    * int(constant[99999]							)
	    * int(constant[999999]							)
	)


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