{"raw_statement":[{"iden":"problem statement","content":"Snuke has decided to construct a string that starts with `A` and ends with `Z`, by taking out a substring of a string $s$ (that is, a consecutive part of $s$).\nFind the greatest length of the string Snuke can construct. Here, the test set guarantees that there always exists a substring of $s$ that starts with `A` and ends with `Z`."},{"iden":"constraints","content":"*   $1 ≦ |s| ≦ 200{,}000$\n*   $s$ consists of uppercase English letters.\n*   There exists a substring of $s$ that starts with `A` and ends with `Z`."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$s$"},{"iden":"sample input 1","content":"QWERTYASDFZXCV"},{"iden":"sample output 1","content":"5\n\nBy taking out the seventh through eleventh characters, it is possible to construct `ASDFZ`, which starts with `A` and ends with `Z`."},{"iden":"sample input 2","content":"ZABCZ"},{"iden":"sample output 2","content":"4"},{"iden":"sample input 3","content":"HASFJGHOGAKZZFEGA"},{"iden":"sample output 3","content":"12"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}