private int decodeLoopStyle(char[] str) {
		if (str.length == 0) {
			return 0;
		}
		int[] counts = new int[str.length];
		for (int i = counts.length - 1; i >= 0; i--) {
			if (i == counts.length - 1) {
				counts[i] = canDecode(str, i, i) ? 1 : 0;
			} else if (i == counts.length - 2) {
				counts[i] = (canDecode(str, i, i) ? counts[i + 1] : 0) + (canDecode(str, i, i + 1) ? 1 : 0);
			} else {
				counts[i] = (canDecode(str, i, i) ? counts[i + 1] : 0) + (canDecode(str, i, i + 1) ? counts[i + 2] : 0);
			}
		}
		return counts[0];
	}