{"raw_statement":[{"iden":"problem statement","content":"In a parallel universe, AtCoder holds AtCoder Big Contest, where $10^{16}$ problems are given at once.  \nThe IDs of the problems are as follows, from the $1$\\-st problem in order: `A`, `B`, ..., `Z`, `AA`, `AB`, ..., `ZZ`, `AAA`, ...\nIn other words, the IDs are given in the following order:\n\n*   the strings of length $1$ consisting of uppercase English letters, in lexicographical order;\n*   the strings of length $2$ consisting of uppercase English letters, in lexicographical order;\n*   the strings of length $3$ consisting of uppercase English letters, in lexicographical order;\n*   $...$\n\nGiven a string $S$ that is an ID of a problem given in this contest, find the index of the problem. (See also Samples.)"},{"iden":"constraints","content":"*   $S$ is a valid ID of a problem given in AtCoder Big Contest."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$S$"},{"iden":"sample input 1","content":"AB"},{"iden":"sample output 1","content":"28\n\nThe problem whose ID is `AB` is the $28$\\-th problem of AtCoder Big Contest, so $28$ should be printed."},{"iden":"sample input 2","content":"C"},{"iden":"sample output 2","content":"3\n\nThe problem whose ID is `C` is the $3$\\-rd problem of AtCoder Big Contest, so $3$ should be printed."},{"iden":"sample input 3","content":"BRUTMHYHIIZP"},{"iden":"sample output 3","content":"10000000000000000\n\nThe problem whose ID is `BRUTMHYHIIZP` is the $10^{16}$\\-th (last) problem of AtCoder Big Contest, so $10^{16}$ should be printed as an integer."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}