{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"Alice and Bob need to send secret messages to each other and are discussing ways to encode their messages:\r\u003cbr\u003e\u003cblockquote\u003eAlice: \"Let\u0027s just use a very simple code: We\u0027ll assign \u0027A\u0027 the code word 1, \u0027B\u0027 will be 2, and so on down to \u0027Z\u0027 being assigned 26.\"\r\u003cbr\u003eBob: \"That\u0027s a stupid code, Alice. Suppose I send you the word \u0027BEAN\u0027 encoded as 25114. You could decode that in many different ways!”\r\u003cbr\u003eAlice: \"Sure you could, but what words would you get? Other than \u0027BEAN\u0027, you\u0027d get \u0027BEAAD\u0027, \u0027YAAD\u0027, \u0027YAN\u0027, \u0027YKD\u0027 and \u0027BEKD\u0027. I think you would be able to figure out the correct decoding. And why would you send me the word ‘BEAN’ anyway?”\r\u003cbr\u003eBob: \"OK, maybe that\u0027s a bad example, but I bet you that if you got a string of length 500 there would be tons of different decodings and with that many you would find at least two different ones that would make sense.\"\r\u003cbr\u003eAlice: \"How many different decodings?\"\r\u003cbr\u003eBob: \"Jillions!\" \u003c/blockquote\u003e\r\u003cbr\u003eFor some reason, Alice is still unconvinced by Bob\u0027s argument, so she requires a program that will determine how many decodings there can be for a given string using her code.\r\u003cbr\u003e"}},{"title":"Input","value":{"format":"HTML","content":"Input will consist of multiple input sets. Each set will consist of a single line of digits representing a valid encryption (for example, no line will begin with a 0). There will be no spaces between the digits. An input line of \u00270\u0027 will terminate the input and should not be processed"}},{"title":"Output","value":{"format":"HTML","content":"For each input set, output the number of possible decodings for the input string. All answers will be within the range of a long variable."}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e25114\r\n1111111111\r\n3333333333\r\n0\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e6\r\n89\r\n1\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}