var
a, b, c : array [1..100] of byte;
i, na, nb, nc : integer;
s, s1, s2 : string;
f1, f2 : text;
procedure summa;
var i, p : integer;
begin
p:=0;
for i:=1 to nc do
begin p:=p+c[i]+a[i]; c[i]:=p mod 10; p:=p div 10 end;
if p>0 then begin nc:=nc+1; c[nc]:=p end
end;
begin
for i:=1 to 100 do begin a[i]:=0; b[i]:=0; c[i]:=0 end;
assign(f1,'input.txt'); reset(f1);
assign(f2,'output.txt'); rewrite(f2);
readln(f1,s);
na:=1; a[1]:=1; nb:=1; b[1]:=1; s1:=s[1];
for i:=2 to length(s) do
begin
s2:=s[i]; s1:=s1+s2; nc:=nb; c:=b;
if ('10'<=s1) and (s1<='33') then summa;
na:=nb; a:=b; nb:=nc; b:=c; s1:=s2
end;
for i:=nc downto 1 do write(f2,c[i]); close(f2)
end.
a, b, c : array [1..100] of byte;
i, na, nb, nc : integer;
s, s1, s2 : string;
f1, f2 : text;
procedure summa;
var i, p : integer;
begin
p:=0;
for i:=1 to nc do
begin p:=p+c[i]+a[i]; c[i]:=p mod 10; p:=p div 10 end;
if p>0 then begin nc:=nc+1; c[nc]:=p end
end;
begin
for i:=1 to 100 do begin a[i]:=0; b[i]:=0; c[i]:=0 end;
assign(f1,'input.txt'); reset(f1);
assign(f2,'output.txt'); rewrite(f2);
readln(f1,s);
na:=1; a[1]:=1; nb:=1; b[1]:=1; s1:=s[1];
for i:=2 to length(s) do
begin
s2:=s[i]; s1:=s1+s2; nc:=nb; c:=b;
if ('10'<=s1) and (s1<='33') then summa;
na:=nb; a:=b; nb:=nc; b:=c; s1:=s2
end;
for i:=nc downto 1 do write(f2,c[i]); close(f2)
end.