{"raw_statement":[{"iden":"problem statement","content":"You have a string $A = A_1 A_2 ... A_n$ consisting of lowercase English letters.\nYou 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$.\nYou can perform this operation at most once.\nHow many different strings can you obtain?"},{"iden":"constraints","content":"*   $1 \\leq |A| \\leq 200,000$\n*   $A$ consists of lowercase English letters."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$A$"},{"iden":"sample input 1","content":"aatt"},{"iden":"sample output 1","content":"5\n\nYou can obtain `aatt` (don't do anything), `atat` (reverse $A[2..3]$), `atta` (reverse $A[2..4]$), `ttaa` (reverse $A[1..4]$) and `taat` (reverse $A[1..3]$)."},{"iden":"sample input 2","content":"xxxxxxxxxx"},{"iden":"sample output 2","content":"1\n\nWhatever substring you reverse, you'll always get `xxxxxxxxxx`."},{"iden":"sample input 3","content":"abracadabra"},{"iden":"sample output 3","content":"44"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}