def main():
  s = list(input())
  divide = []
  count = 0
  for i in range(len(s)):
    if s[i] in divide:
      count += 1
    else:
      divide.append(s[i])
  print(count)


if __name__ == '__main__':
  main()
