using System.Diagnostics;
public static void Main()
public static void NumDecodings(string s)
Console.WriteLine(Decode(0, 0));
public static int Decode(int pos, int read)
Console.WriteLine("{0} ..:.. {1}", pos, read);
if(pos >= str.Length) return 0;
if(read == 2 && (str[pos] - '0') > 2)
Console.WriteLine("end");
return Decode(pos + 1, 1);
if(read == ((str.Length) - pos)) {
return Decode(pos + read, 2) + Decode(pos + read, 1);