Implement the functionality of the max_phone_numbers function which calculates the maximum number of valid phone numbers that can be formed based on given conditions.
Functionality Requirements:
The function should count how many '8's are present in the input string s.
It should determine how many phone numbers can be created, where each phone number requires one '8' and a total of 11 digits (including the '8').
The function should return the total number of valid phone numbers that can be constructed.
Input/Output Requirements:
Input:
An integer n (1 ≤ n ≤ 100), representing the total number of digits available (the length of the string s).
A string s of length n, containing digits (0-9) where the digit '8' is crucial for forming phone numbers.
Output:
An integer representing the maximum number of phone numbers that can be created.
Example:
python
max_phone_numbers(13, "8812345678901") # should return 1
max_phone_numbers(11, "12345678900") # should return 0
max_phone_numbers(12, "888888888888") # should return 1
Implementation Instructions:
Write the function in a file named /app/solution.py.
Ensure the function follows the provided logic structure and handles edge cases properly.