For this Question: Given a string S. Find a string R which is an anagram of S and the hamming distance between S and R is maximum.
An anagram of a string is another string that contains the same characters, only the order of characters can be different.
Hamming distance between two strings of equal length is the number of positions at which the corresponding character is different.The first and the only line of input contains a single string S.

Constraints:
1 <= |S| <= 100000
S contains only lowercase letters of the English alphabet.Print the maximum hamming distance between S and R.Sample Input 1
absba

Sample Output 1
5

Explanation: R can be "bsaab" which has hamming distance of 5 from S.

Sample Input 2
aaa

Sample Output 2
0

Explanation: R can be "aaa" which has hamming distance of 0 from S., I have written this Solution Code: s=input()
si=len(s)
d={}
for i in s:
	if i in d:
		d[i]+=1
	else:
		d[i]=1
l=list(d.values())
k = list(d.keys())
a=max(l)
if(si>=(2*a)):
	print(si)
else:
	ans=si-a
	print(2*ans), In this Programming Language: Python, Now tell me if this Code is compilable or not?