P93
# include<bits/stdc++.h>
using namespace std;
const int N = 10000;
string str;
int f[N];
//f[i]表示以str[i]结尾的编码所能表示的字母序列个数
//f[i] = f[i-1] + f[i-2]
int main()
{
cin>>str;
str = " "+str;
f[0] = 1;
f[1] = 1;
for(int i = 2; i<str.length(); i++)
{
int a = int(str[i-1]-'0');
int b = int(str[i]-'0');
if(b>=1 && b<=26) f[i] += f[i-1];
if(a!=0 && (a*10+b)>=1 && (a*10+b)<=26) f[i] += f[i-2];
}
cout<<f[str.length()-1]<<endl;
}