For this Question: Given a string S. You can rearrange its letters in any way you want. You have to the find the maximum number of substrings in S which are equal to "abcda" after rearrangement.First line of input contains a single string S.

Constraints:
1 <= |S| <= 100000
String contains lowercase english letters.Output a single integer which is the maximum number of substrings in S which are equal to "abcda" after rearrangement.Sample Input
cbdaaabcda

Sample Output
2

Explanation : we can rearrange the given string as abcdaabcda, I have written this Solution Code: arr=input()
a=0
b=0
c=0
d=0
for i in range(0,len(arr)):
    if(arr[i]=='a'):
        a+=1
    elif (arr[i]=='b'):
        b+=1
    elif (arr[i]=='c'):
        c+=1
    elif (arr[i]=='d'):
        d+=1
ans=(min(int(a/2),b,c,d))
ans1=min(a-1,b,c,d)
print (max(ans,ans1)), In this Programming Language: Python, Now tell me if this Code is compilable or not?