s = list(input())
n = len(s)
m = [True] * n

result = 0
for i in range(n):
  for j in range(n):
    if s[i] != s[j] and m[i] and m[j]:
      result += 2
      m[i] = False
      m[j] = False
print(result)