0
I need help in this python exercise
Marlon likes to cut letters from his magazines, then reorganize them to form sentences. Once, he cut out the letters ZEPUAMAOIZ and realized that changing the order of the letters could form the phrase EUAMOPIZZA. As it is near Christmas, he decided that he would make decorations with the word CHRISTMAS to distribute to his friends! For this, Marlon cut out several letters from several different magazines. But now it has a huge amount of scrambled letters, and you don’t know how many words NATAL will be able to form with them!
He knows you understand computing, so he asked you to make a program that, given the scrambled letters, finds out how many times it is possible to form the word he wants. So Marlon will know how many friends he can present with the lyrics he has!
Input Specification:
The first line of entry contains a single integer N, the number of letters Marlon has.
The second line of input has N characters of the alphabet, lowercase, are the letters that Marlon cut out.
Output Specification:
You must produce a single output line, containing an integer indicating the amount of times it is possible to form the word NATAL with the letters obtained from input.
example:
input
9
natalnatl
output
1
i tried with this code which in practice is functional but half 'gambiara', and the Obs: exercise has the execution time limit of the code a second
a = str(input())
b = a.count('n')
c = a.count('a')
d = a.count('t')
e = a.count('l')
if 5 <= b + c + d + e < 10:
print(1)