output_description: Print the number of different strings you can obtain by reversing any
  substring in A at most once.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      A
attempt: print(
      (
          len(a := input()) ** 2
          - sum(map(lambda x: x * x, map(a.count, [chr(i) for i in range(97, 123)])))
      )
      // 2
      + 1
  )
  
problem_description: Statement
  
  You have a string A = A_1 A_2 ... A_n consisting of lowercase English letters.
  
  You can choose any two indices i and j such that 1 \leq i \leq j \leq n and
  reverse substring A_i A_{i+1} ... A_j.
  
  You can perform this operation at most once.
  
  How many different strings can you obtain?
samples: [{"input": "aatt", "output": "5\n    \n\nYou can obtain `aatt` (don't do anything), `atat` (reverse A[2..3]), `atta`\n(reverse A[2..4]), `ttaa` (reverse A[1..4]) and `taat` (reverse A[1..3]).\n\n* * *"}, {"input": "xxxxxxxxxx", "output": "1\n    \n\nWhatever substring you reverse, you'll always get `xxxxxxxxxx`.\n\n* * *"}, {"input": "abracadabra", "output": "44"}]