using System;
using System.Linq;
using System.Collections.Generic;
using Debug = System.Diagnostics.Debug;
using StringBuilder = System.Text.StringBuilder;
using System.Numerics;
namespace Program
{
    public class Solver
    {
        public void Solve()
        {
            var v = sc.Integer();
            var K = sc.Integer();
            double p = sc.Integer() / 100.0;
            var q = 1 - p;
            var dp = new double[256, 32, 255];
            var max = v & -v;
            var to = 255;
            for (int i = 0; i <= 200; i++)
            {
                if (max < ((v + i) & -(v + i)))
                {
                    max = (v + i) & -(v + i);
                    to = i;
                    //break;
                }
            }
            var now = v & -v;
            for (int i = 0; i < 32; i++)
            {
                if ((max >> i) % 2 == 1) max = i;
                if ((now >> i) % 2 == 1) now = i;
            }
            dp[to, max, now] = 1.0;
            for (int _ = 0; _ < K; _++)
            {
                var next = new double[256, 32, 255];
                for (int i = 0; i < 256; i++)
                    for (int j = 0; j < 32; j++)
                        for (int k = 0; k < 250; k++)
                        {
                            if (dp[i, j, k] == 0) continue;
                            if (i * 2 < 256)
                                next[i * 2, j + 1, k + 1] += dp[i, j, k] * p;
                            else next[0, 0, k + 1] += dp[i, j, k] * p;

                            if (i == 0)
                                next[1, 0, 0] += dp[i, j, k] * q;
                            else if (i == 1)
                                next[Math.Min(1 << (j + 1), 255), Math.Min(j + 1, 31), Math.Max(j + 1, k + 1)] += dp[i, j, k] * q;
                            else
                            {
                                var num = i - 1;
                                for (int l = 0; l < 32; l++)
                                    if ((num >> l) % 2 == 1)
                                    {
                                        next[num, j, l] += dp[i, j, k] * q;
                                        break;
                                    }

                            }
                        }
                dp = next;
            }
            var E = 0.0;
            for (int i = 0; i < 256; i++)
                for (int j = 0; j < 32; j++)
                    for (int k = 0; k < 255; k++)
                        E += k * dp[i, j, k];
            IO.Printer.Out.WriteLine("{0:F12}",E);

        }
        internal IO.StreamScanner sc = new IO.StreamScanner(Console.OpenStandardInput());
        static T[] Enumerate<T>(int n, Func<T> f) { var a = new T[n]; for (int i = 0; i < n; ++i) a[i] = f(); return a; }
        static T[] Enumerate<T>(int n, Func<int, T> f) { var a = new T[n]; for (int i = 0; i < n; ++i) a[i] = f(i); return a; }
    }
}

#region Ex
namespace Program.IO
{
    using System.IO;
    using System.Linq;
    public class Printer : StreamWriter
    {
        static Printer()
        {
            Out = new Printer(Console.OpenStandardOutput()) { AutoFlush = false };
            Error = new Printer(System.IO.Stream.Null);
        }
        public static Printer Out { get; set; }
        public static Printer Error { get; set; }
        public override IFormatProvider FormatProvider { get { return System.Globalization.CultureInfo.InvariantCulture; } }
        public Printer(System.IO.Stream stream) : base(stream, new System.Text.UTF8Encoding(false, true)) { }
        public void Write<T>(string format, IEnumerable<T> source) { base.Write(format, source.OfType<object>().ToArray()); }
        public void WriteLine<T>(string format, IEnumerable<T> source) { base.WriteLine(format, source.OfType<object>().ToArray()); }
    }
    public class StreamScanner
    {
        public StreamScanner(Stream stream) { str = stream; }
        private readonly Stream str;
        private readonly byte[] buf = new byte[1024];
        private int len, ptr;
        public bool isEof = false;
        public bool IsEndOfStream { get { return isEof; } }
        private byte read()
        {
            if (isEof) return 0;
            if (ptr >= len) { ptr = 0; if ((len = str.Read(buf, 0, 1024)) <= 0) { isEof = true; return 0; } }
            return buf[ptr++];
        }
        public char Char() { byte b = 0; do b = read(); while (b < 33 || 126 < b); return (char)b; }
        public char[] Char(int n) { var a = new char[n]; for (int i = 0; i < n; i++) a[i] = Char(); return a; }
        public string Scan()
        {
            var sb = new StringBuilder();
            for (var b = Char(); b >= 33 && b <= 126; b = (char)read())
                sb.Append(b);
            return sb.ToString();
        }
        public long Long()
        {
            if (isEof) return long.MinValue;
            long ret = 0; byte b = 0; var ng = false;
            do b = read();
            while (b != '-' && (b < '0' || '9' < b));
            if (b == '-') { ng = true; b = read(); }
            for (; true; b = read())
            {
                if (b < '0' || '9' < b)
                    return ng ? -ret : ret;
                else ret = ret * 10 + b - '0';
            }
        }
        public int Integer() { return (isEof) ? int.MinValue : (int)Long(); }
        public double Double() { return double.Parse(Scan(), System.Globalization.CultureInfo.InvariantCulture); }
        private T[] enumerate<T>(int n, Func<T> f)
        {
            var a = new T[n];
            for (int i = 0; i < n; ++i) a[i] = f();
            return a;
        }

        public string[] Scan(int n) { return enumerate(n, Scan); }
        public double[] Double(int n) { return enumerate(n, Double); }
        public int[] Integer(int n) { return enumerate(n, Integer); }
        public long[] Long(int n) { return enumerate(n, Long); }
        public void Flush() { str.Flush(); }

    }
}
static class Ex
{
    static public string AsString(this IEnumerable<char> ie) { return new string(System.Linq.Enumerable.ToArray(ie)); }
    static public string AsJoinedString<T>(this IEnumerable<T> ie, string st = " ") { return string.Join(st, ie); }
    static public void Main()
    {
        var solver = new Program.Solver();
        solver.Solve();
        Program.IO.Printer.Out.Flush();
    }
}
#endregion


using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading;

// (づ°ω°)づﾐe★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・゜
public class Solution
{
    public void Solve()
    {
        int n = ReadInt();
        var a = ReadIntArray();

        int s = a.Sum();
        if (s % 2 > 0)
        {
            Write(0);
            return;
        }

        s /= 2;
        var dp = new bool[n + 1, s + 1];
        for (int i = 0; i <= n; i++)
            dp[i, 0] = true;
        for (int i = 1; i <= n; i++)
            for (int j = 0; j <= s; j++)
            {
                dp[i, j] = dp[i - 1, j];
                if (j >= a[i - 1])
                    dp[i, j] |= dp[i - 1, j - a[i - 1]];
            }

        if (!dp[n, s])
            Write(0);
        else
        {
            Write(1);
            if (a.All(_ => _ % 2 == 0))
                Write(0);
            else
            {
                for (int i = 0; ; i++)
                    if (a[i] % 2 > 0)
                    {
                        Write(i);
                        break;
                    }
            }
        }
    }

    #region Main

    protected static TextReader reader;
    protected static TextWriter writer;
    static void Main()
    {
#if DEBUGLOCAL
        reader = new StreamReader("..\\..\\input.txt");
        //reader = new StreamReader(Console.OpenStandardInput());
        writer = Console.Out;
        //writer = new StreamWriter("..\\..\\output.txt");
#else
        reader = new StreamReader(Console.OpenStandardInput());
        writer = new StreamWriter(Console.OpenStandardOutput());
        //reader = new StreamReader("ysys.in");
        //writer = new StreamWriter("output.txt");
#endif
        try
        {
            new Solution().Solve();
            //var thread = new Thread(new Solution().Solve, 1024 * 1024 * 128);
            //thread.Start();
            //thread.Join();
        }
        catch (Exception ex)
        {
#if DEBUGLOCAL
            Console.WriteLine(ex);
#else
            throw;
#endif
        }
        reader.Close();
        writer.Close();
    }

    #endregion

    #region Read / Write
    private static Queue<string> currentLineTokens = new Queue<string>();
    private static string[] ReadAndSplitLine() { return reader.ReadLine().Split(new[] { ' ', '\t', }, StringSplitOptions.RemoveEmptyEntries); }
    public static string ReadToken() { while (currentLineTokens.Count == 0) currentLineTokens = new Queue<string>(ReadAndSplitLine()); return currentLineTokens.Dequeue(); }
    public static int ReadInt() { return int.Parse(ReadToken()); }
    public static long ReadLong() { return long.Parse(ReadToken()); }
    public static double ReadDouble() { return double.Parse(ReadToken(), CultureInfo.InvariantCulture); }
    public static int[] ReadIntArray() { return ReadAndSplitLine().Select(int.Parse).ToArray(); }
    public static long[] ReadLongArray() { return ReadAndSplitLine().Select(long.Parse).ToArray(); }
    public static double[] ReadDoubleArray() { return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); }
    public static int[][] ReadIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = ReadIntArray(); return matrix; }
    public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)
    {
        int[][] matrix = ReadIntMatrix(numberOfRows); int[][] ret = new int[matrix[0].Length][];
        for (int i = 0; i < ret.Length; i++) { ret[i] = new int[numberOfRows]; for (int j = 0; j < numberOfRows; j++) ret[i][j] = matrix[j][i]; }
        return ret;
    }
    public static string[] ReadLines(int quantity) { string[] lines = new string[quantity]; for (int i = 0; i < quantity; i++) lines[i] = reader.ReadLine().Trim(); return lines; }
    public static void WriteArray<T>(IEnumerable<T> array) { writer.WriteLine(string.Join(" ", array)); }
    public static void Write(params object[] array) { WriteArray(array); }
    public static void WriteLines<T>(IEnumerable<T> array) { foreach (var a in array) writer.WriteLine(a); }
    private class SDictionary<TKey, TValue> : Dictionary<TKey, TValue>
    {
        public new TValue this[TKey key]
        {
            get { return ContainsKey(key) ? base[key] : default(TValue); }
            set { base[key] = value; }
        }
    }
    private static T[] Init<T>(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++) ret[i] = new T(); return ret; }
    #endregion
}


using System;
using System.Linq;

class C
{
	static int[] Read() => Array.ConvertAll(Console.ReadLine().Split(), int.Parse);
	static (int, int) Read2() { var a = Read(); return (a[0], a[1]); }
	static long[] ReadL() => Array.ConvertAll(Console.ReadLine().Split(), long.Parse);
	static void Main() => Console.WriteLine(Solve());
	static object Solve()
	{
		var n = int.Parse(Console.ReadLine());
		var a = Read();

		var sum = a.Sum();
		if (sum % 2 != 0) return 0;

		var u = Comb(n, a, sum);
		if (!u[sum / 2]) return 0;

		var odds = Enumerable.Range(0, n).Where(i => a[i] % 2 == 1).ToArray();
		if (odds.Any()) return $"1\n{odds[0] + 1}";

		var argmin = Enumerable.Range(0, n).OrderBy(i => a[i]).First();
		return $"1\n{argmin + 1}";
	}

	static bool[] Comb(int n, int[] a, int max)
	{
		var u = new bool[max + 1];
		u[0] = true;

		for (int i = 0; i < n; i++)
		{
			for (int j = max; j >= 0; j--)
			{
				if (u[j])
				{
					u[j + a[i]] = true;
				}
			}
		}
		return u;
	}
}


using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading;

// (づ°ω°)づﾐe★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・゜
public class Solution
{
    bool Fun(int[] a, int n)
    {
        int s = a.Sum();
        if (s % 2 > 0)
            return false;

        s /= 2;
        var dp = new bool[n + 1, s + 1];
        for (int i = 0; i <= n; i++)
            dp[i, 0] = true;
        for (int i = 1; i <= n; i++)
            for (int j = 1; j <= s; j++)
            {
                dp[i, j] = dp[i - 1, j];
                if (j >= a[i - 1])
                    dp[i, j] |= dp[i - 1, j - a[i - 1]];
            }

        return dp[n, s];
    }

    public void Solve()
    {
        int n = ReadInt();
        var a = ReadIntArray();

        if (!Fun(a, n))
            Write(0);
        else
        {
            Write(1);
            if (a.All(_ => _ % 2 == 0))
                Write(1);
            else
            {
                for (int i = 0; ; i++)
                    if (a[i] % 2 > 0)
                    {
                        Write(i + 1);
                        break;
                    }
            }
        }
    }

    #region Main

    protected static TextReader reader;
    protected static TextWriter writer;
    static void Main()
    {
#if DEBUGLOCAL
        reader = new StreamReader("..\\..\\input.txt");
        //reader = new StreamReader(Console.OpenStandardInput());
        writer = Console.Out;
        //writer = new StreamWriter("..\\..\\output.txt");
#else
        reader = new StreamReader(Console.OpenStandardInput());
        writer = new StreamWriter(Console.OpenStandardOutput());
        //reader = new StreamReader("ysys.in");
        //writer = new StreamWriter("output.txt");
#endif
        try
        {
            new Solution().Solve();
            //var thread = new Thread(new Solution().Solve, 1024 * 1024 * 128);
            //thread.Start();
            //thread.Join();
        }
        catch (Exception ex)
        {
#if DEBUGLOCAL
            Console.WriteLine(ex);
#else
            throw;
#endif
        }
        reader.Close();
        writer.Close();
    }

    #endregion

    #region Read / Write
    private static Queue<string> currentLineTokens = new Queue<string>();
    private static string[] ReadAndSplitLine() { return reader.ReadLine().Split(new[] { ' ', '\t', }, StringSplitOptions.RemoveEmptyEntries); }
    public static string ReadToken() { while (currentLineTokens.Count == 0) currentLineTokens = new Queue<string>(ReadAndSplitLine()); return currentLineTokens.Dequeue(); }
    public static int ReadInt() { return int.Parse(ReadToken()); }
    public static long ReadLong() { return long.Parse(ReadToken()); }
    public static double ReadDouble() { return double.Parse(ReadToken(), CultureInfo.InvariantCulture); }
    public static int[] ReadIntArray() { return ReadAndSplitLine().Select(int.Parse).ToArray(); }
    public static long[] ReadLongArray() { return ReadAndSplitLine().Select(long.Parse).ToArray(); }
    public static double[] ReadDoubleArray() { return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); }
    public static int[][] ReadIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = ReadIntArray(); return matrix; }
    public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)
    {
        int[][] matrix = ReadIntMatrix(numberOfRows); int[][] ret = new int[matrix[0].Length][];
        for (int i = 0; i < ret.Length; i++) { ret[i] = new int[numberOfRows]; for (int j = 0; j < numberOfRows; j++) ret[i][j] = matrix[j][i]; }
        return ret;
    }
    public static string[] ReadLines(int quantity) { string[] lines = new string[quantity]; for (int i = 0; i < quantity; i++) lines[i] = reader.ReadLine().Trim(); return lines; }
    public static void WriteArray<T>(IEnumerable<T> array) { writer.WriteLine(string.Join(" ", array)); }
    public static void Write(params object[] array) { WriteArray(array); }
    public static void WriteLines<T>(IEnumerable<T> array) { foreach (var a in array) writer.WriteLine(a); }
    private class SDictionary<TKey, TValue> : Dictionary<TKey, TValue>
    {
        public new TValue this[TKey key]
        {
            get { return ContainsKey(key) ? base[key] : default(TValue); }
            set { base[key] = value; }
        }
    }
    private static T[] Init<T>(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++) ret[i] = new T(); return ret; }
    #endregion
}


using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading;

// (づ°ω°)づﾐe★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・゜
public class Solution
{
    public void Solve()
    {
        int n = ReadInt();
        var a = ReadIntArray();

        int s = a.Sum();
        if (s % 2 > 0)
        {
            Write(0);
            return;
        }

        s /= 2;
        var dp = new bool[n + 1, s + 1];
        for (int i = 0; i <= n; i++)
            dp[i, 0] = true;
        for (int i = 1; i <= n; i++)
            for (int j = 0; j <= s; j++)
            {
                dp[i, j] = dp[i - 1, j];
                if (j >= a[i - 1])
                    dp[i, j] |= dp[i - 1, j - a[i - 1]];
            }

        if (!dp[n, s])
            Write(0);
        else
        {
            Write(1);
            if (a.All(_ => _ % 2 == 0))
                Write(a[0]);
            else
                Write(a.First(_ => _ % 2 > 0));
        }
    }

    #region Main

    protected static TextReader reader;
    protected static TextWriter writer;
    static void Main()
    {
#if DEBUGLOCAL
        reader = new StreamReader("..\\..\\input.txt");
        //reader = new StreamReader(Console.OpenStandardInput());
        writer = Console.Out;
        //writer = new StreamWriter("..\\..\\output.txt");
#else
        reader = new StreamReader(Console.OpenStandardInput());
        writer = new StreamWriter(Console.OpenStandardOutput());
        //reader = new StreamReader("ysys.in");
        //writer = new StreamWriter("output.txt");
#endif
        try
        {
            new Solution().Solve();
            //var thread = new Thread(new Solution().Solve, 1024 * 1024 * 128);
            //thread.Start();
            //thread.Join();
        }
        catch (Exception ex)
        {
#if DEBUGLOCAL
            Console.WriteLine(ex);
#else
            throw;
#endif
        }
        reader.Close();
        writer.Close();
    }

    #endregion

    #region Read / Write
    private static Queue<string> currentLineTokens = new Queue<string>();
    private static string[] ReadAndSplitLine() { return reader.ReadLine().Split(new[] { ' ', '\t', }, StringSplitOptions.RemoveEmptyEntries); }
    public static string ReadToken() { while (currentLineTokens.Count == 0) currentLineTokens = new Queue<string>(ReadAndSplitLine()); return currentLineTokens.Dequeue(); }
    public static int ReadInt() { return int.Parse(ReadToken()); }
    public static long ReadLong() { return long.Parse(ReadToken()); }
    public static double ReadDouble() { return double.Parse(ReadToken(), CultureInfo.InvariantCulture); }
    public static int[] ReadIntArray() { return ReadAndSplitLine().Select(int.Parse).ToArray(); }
    public static long[] ReadLongArray() { return ReadAndSplitLine().Select(long.Parse).ToArray(); }
    public static double[] ReadDoubleArray() { return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); }
    public static int[][] ReadIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = ReadIntArray(); return matrix; }
    public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)
    {
        int[][] matrix = ReadIntMatrix(numberOfRows); int[][] ret = new int[matrix[0].Length][];
        for (int i = 0; i < ret.Length; i++) { ret[i] = new int[numberOfRows]; for (int j = 0; j < numberOfRows; j++) ret[i][j] = matrix[j][i]; }
        return ret;
    }
    public static string[] ReadLines(int quantity) { string[] lines = new string[quantity]; for (int i = 0; i < quantity; i++) lines[i] = reader.ReadLine().Trim(); return lines; }
    public static void WriteArray<T>(IEnumerable<T> array) { writer.WriteLine(string.Join(" ", array)); }
    public static void Write(params object[] array) { WriteArray(array); }
    public static void WriteLines<T>(IEnumerable<T> array) { foreach (var a in array) writer.WriteLine(a); }
    private class SDictionary<TKey, TValue> : Dictionary<TKey, TValue>
    {
        public new TValue this[TKey key]
        {
            get { return ContainsKey(key) ? base[key] : default(TValue); }
            set { base[key] = value; }
        }
    }
    private static T[] Init<T>(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++) ret[i] = new T(); return ret; }
    #endregion
}


using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading;

// (づ°ω°)づﾐe★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・゜
public class Solution
{
    public void Solve()
    {
        int n = ReadInt();
        var a = ReadIntArray();

        int s = a.Sum();
        if (s % 2 > 0)
        {
            Write(0);
            return;
        }

        s /= 2;
        var dp = new bool[n + 1, s + 1];
        for (int i = 0; i <= n; i++)
            dp[i, 0] = true;
        for (int i = 1; i <= n; i++)
            for (int j = 0; j <= s; j++)
            {
                dp[i, j] = dp[i - 1, j];
                if (j >= a[i - 1])
                    dp[i, j] |= dp[i - 1, j - a[i - 1]];
            }

        if (!dp[n, s])
            Write(0);
        else
        {
            Write(1);
            if (a.All(_ => _ % 2 == 0))
                Write(1);
            else
            {
                for (int i = 0; ; i++)
                    if (a[i] % 2 > 0)
                    {
                        Write(i + 1);
                        break;
                    }
            }
        }
    }

    #region Main

    protected static TextReader reader;
    protected static TextWriter writer;
    static void Main()
    {
#if DEBUGLOCAL
        reader = new StreamReader("..\\..\\input.txt");
        //reader = new StreamReader(Console.OpenStandardInput());
        writer = Console.Out;
        //writer = new StreamWriter("..\\..\\output.txt");
#else
        reader = new StreamReader(Console.OpenStandardInput());
        writer = new StreamWriter(Console.OpenStandardOutput());
        //reader = new StreamReader("ysys.in");
        //writer = new StreamWriter("output.txt");
#endif
        try
        {
            new Solution().Solve();
            //var thread = new Thread(new Solution().Solve, 1024 * 1024 * 128);
            //thread.Start();
            //thread.Join();
        }
        catch (Exception ex)
        {
#if DEBUGLOCAL
            Console.WriteLine(ex);
#else
            throw;
#endif
        }
        reader.Close();
        writer.Close();
    }

    #endregion

    #region Read / Write
    private static Queue<string> currentLineTokens = new Queue<string>();
    private static string[] ReadAndSplitLine() { return reader.ReadLine().Split(new[] { ' ', '\t', }, StringSplitOptions.RemoveEmptyEntries); }
    public static string ReadToken() { while (currentLineTokens.Count == 0) currentLineTokens = new Queue<string>(ReadAndSplitLine()); return currentLineTokens.Dequeue(); }
    public static int ReadInt() { return int.Parse(ReadToken()); }
    public static long ReadLong() { return long.Parse(ReadToken()); }
    public static double ReadDouble() { return double.Parse(ReadToken(), CultureInfo.InvariantCulture); }
    public static int[] ReadIntArray() { return ReadAndSplitLine().Select(int.Parse).ToArray(); }
    public static long[] ReadLongArray() { return ReadAndSplitLine().Select(long.Parse).ToArray(); }
    public static double[] ReadDoubleArray() { return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); }
    public static int[][] ReadIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = ReadIntArray(); return matrix; }
    public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)
    {
        int[][] matrix = ReadIntMatrix(numberOfRows); int[][] ret = new int[matrix[0].Length][];
        for (int i = 0; i < ret.Length; i++) { ret[i] = new int[numberOfRows]; for (int j = 0; j < numberOfRows; j++) ret[i][j] = matrix[j][i]; }
        return ret;
    }
    public static string[] ReadLines(int quantity) { string[] lines = new string[quantity]; for (int i = 0; i < quantity; i++) lines[i] = reader.ReadLine().Trim(); return lines; }
    public static void WriteArray<T>(IEnumerable<T> array) { writer.WriteLine(string.Join(" ", array)); }
    public static void Write(params object[] array) { WriteArray(array); }
    public static void WriteLines<T>(IEnumerable<T> array) { foreach (var a in array) writer.WriteLine(a); }
    private class SDictionary<TKey, TValue> : Dictionary<TKey, TValue>
    {
        public new TValue this[TKey key]
        {
            get { return ContainsKey(key) ? base[key] : default(TValue); }
            set { base[key] = value; }
        }
    }
    private static T[] Init<T>(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++) ret[i] = new T(); return ret; }
    #endregion
}


namespace Csharp_Contest
{
    using System;
    using System.Collections.Generic;
    using System.Diagnostics;
    using System.Globalization;
    using System.IO;
    using System.Linq;
    using System.Text;
    using System.Threading;

    /*
     * #import_BitMap.cs
     */

    static class Program
    {
        private const int StackSize = 64 * (1 << 20);
        private const int Sz = (int)2e5 + 10;
        private const int Mod = (int)1e9 + 7;
        private static int n;
        private static BitMap dp;
        private static BitMap vp;
        private static List<int> ar;

        private static void Solve()
        {
            int n = NextInt();
            dp = new BitMap(n, n + 1, Sz);
            vp = new BitMap(n, n + 1, Sz);
            ar = Repeat(0, n).Select(_ => NextInt()).ToList();
            int sum = ar.Aggregate((s, n) => s + n);
            if (sum % 2 == 1 || !Possible(n - 1, n, 0, 0))
            {
                OutputPrinter.WriteLine(0);
            }
            else
            {
                for (int i = 0; i < n; i++)
                {
                    if (!Possible(n - 1, i, 0, 0))
                    {
                        OutputPrinter.WriteLine(1);
                        OutputPrinter.WriteLine(i + 1);
                        break;
                    }
                }
            }
        }

        private static bool Possible(int x, int skip, int sumLeft, int sumRight)
        {
            if (x < 0)
            {
                return sumLeft == sumRight;
            }

            if (vp[x, skip, sumLeft])
            {
                return dp[x, skip, sumLeft];
            }

            vp[x, skip, sumLeft] = true;

            if (x == skip)
            {
                return dp[x, skip, sumLeft] = Possible(x - 1, skip, sumLeft, sumRight);
            }

            dp[x, skip, sumLeft] = dp[x, skip, sumLeft] || Possible(x - 1, skip, sumLeft + ar[x], sumRight);
            dp[x, skip, sumLeft] = dp[x, skip, sumLeft] || Possible(x - 1, skip, sumLeft, sumRight + ar[x]);

            return dp[x, skip, sumLeft];
        }

        public static void Main(string[] args)
        {
#if CLown1331
            for (int testCase = 0; testCase < 4; testCase++)
            {
                Solve();
            }

            Utils.CreateFileForSubmission();
            if (Debugger.IsAttached) Thread.Sleep(Timeout.Infinite);
#else
            Thread t = new Thread(Solve, StackSize);
            t.Start();
            t.Join();
#endif
            OutputPrinter.Flush();
            ErrorPrinter.Flush();
        }

        private static int NextInt() => int.Parse(Reader.NextString());

        private static long NextLong() => long.Parse(Reader.NextString());

        private static double NextDouble() => double.Parse(Reader.NextString());

        private static string NextString() => Reader.NextString();

        private static string NextLine() => Reader.ReadLine();

        private static IEnumerable<T> OrderByRand<T>(this IEnumerable<T> x) => x.OrderBy(_ => XorShift);

        private static long Count<T>(this IEnumerable<T> x, Func<T, bool> pred) => Enumerable.Count(x, pred);

        private static IEnumerable<T> Repeat<T>(T v, long n) => Enumerable.Repeat<T>(v, (int)n);

        private static IEnumerable<int> Range(long s, long c) => Enumerable.Range((int)s, (int)c);

        private static uint XorShift
        {
            get
            {
                Xsc().MoveNext();
                return Xsc().Current;
            }
        }

        private static IEnumerator<uint> Xsc()
        {
            uint x = 123456789, y = 362436069, z = 521288629, w = (uint)(DateTime.Now.Ticks & 0xffffffff);
            while (true)
            {
                uint t = x ^ (x << 11);
                x = y;
                y = z;
                z = w;
                w = (w ^ (w >> 19)) ^ (t ^ (t >> 8));
                yield return w;
            }
        }

        private static class Reader
        {
            private static readonly Queue<string> Param = new Queue<string>();
#if CLown1331
            private static readonly StreamReader InputReader = new StreamReader("input.txt");
#else
            private static readonly StreamReader InputReader = new StreamReader(Console.OpenStandardInput());
#endif

            public static string NextString()
            {
                if (Param.Count == 0)
                {
                    foreach (string item in ReadLine().Split(' '))
                    {
                        if (string.IsNullOrWhiteSpace(item))
                        {
                            continue;
                        }

                        Param.Enqueue(item);
                    }
                }

                return Param.Dequeue();
            }

            public static string ReadLine()
            {
                return InputReader.ReadLine();
            }
        }

        private static readonly Printer OutputPrinter = new Printer(Console.OpenStandardOutput());

        private static readonly Printer ErrorPrinter = new Printer(Console.OpenStandardError());

        private sealed class Printer : StreamWriter
        {
            public Printer(Stream stream)
                : base(stream, new UTF8Encoding(false, true))
            {
                this.AutoFlush = false;
            }

            public Printer(Stream stream, Encoding encoding)
                : base(stream, encoding)
            {
                this.AutoFlush = false;
            }

            public override IFormatProvider FormatProvider => CultureInfo.InvariantCulture;
        }
    }
}
namespace Csharp_Contest
{
    using System;
    using System.Collections;
    using System.Linq;

    public class BitMap
    {
        private readonly BitArray bitArray;
        private readonly int[] dimensions;

        public BitMap(params int[] dimensions)
        {
            this.dimensions = dimensions;
            this.bitArray = new BitArray(this.dimensions.Aggregate((s, n) => s * n));
        }

        public void SetValue(bool value, params int[] indexes)
        {
            this.ValidateIndexes(indexes);
            this.bitArray[this.GetIndex(indexes)] = value;
        }

        public bool GetValue(int[] indexes)
        {
            this.ValidateIndexes(indexes);
            return this.bitArray[this.GetIndex(indexes)];
        }

        public bool this[params int[] indexes]
        {
            get => this.GetValue(indexes);
            set => this.SetValue(value, indexes);
        }

        private void ValidateIndexes(int[] indexes)
        {
            if (indexes.Length != this.dimensions.Length)
            {
                throw new Exception("Number of indexes != _dimensions");
            }

            for (int i = 0; i < indexes.Length; i++)
            {
                if (indexes[i] < 0 || indexes[i] >= this.dimensions[i])
                {
                    throw new IndexOutOfRangeException();
                }
            }
        }

        private int GetIndex(int[] indexes)
        {
            int ret = 0;
            int power = 1;
            for (int i = 1; i <= indexes.Length; i++)
            {
                ret += power * indexes[^i];
                power *= this.dimensions[^i];
            }

            return ret;
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using static System.Linq.Enumerable;
using static System.Math;

namespace CompetitiveProgramming
{
	class Program
	{
		public static void Main()
		{
			var n = int.Parse(Console.ReadLine());
			var a = GetInts(n);

			var total = a.Sum();
			if (total % 2 == 1)
			{
				Console.WriteLine(0);
				return;
			}

			var achievable = new bool[total + 1];
			achievable[0] = true;
			foreach (var val in a)
			{
				var newAchievable = new bool[total + 1];

				for (int i = 0; i < achievable.Length; i++)
					if (achievable[i])
						newAchievable[i] = newAchievable[i + val] = true;

				achievable = newAchievable;
			}

			var canDoHalf = achievable[total / 2];
			if (!canDoHalf)
			{
				Console.WriteLine(0);
				return;
			}

			var maxParity = Range(0, 30).Where(x => a.All(elem => elem % (1 << x) == 0)).Max();
			var nextParity = 1 << (maxParity + 1);

			var first = a.First(x => x % nextParity != 0);
			Console.WriteLine(1);
			Console.WriteLine(a.ToList().IndexOf(first) + 1);
		}

		public static (int, int)[] GetPairs(int count)
		{
			var qs = new (int, int)[count];
			for (int i = 0; i < count; i++)
			{
				var line = Console.ReadLine();
				int spacePos = 1;
				while (line[spacePos] != ' ')
					spacePos++;

				var l = int.Parse(line.AsSpan(0, spacePos));
				var r = int.Parse(line.AsSpan(spacePos + 1, line.Length - spacePos - 1));
				qs[i] = (l - 1, r - 1);
			}

			return qs;
		}

		public static int[] GetInts(int count)
		{
			var str = Console.ReadLine();
			var a = new int[count];

			var currentStart = 0;
			for (int i = 0; i < count - 1; i++)
			{
				int currentEnd = currentStart + 1;
				while (str[currentEnd] != ' ')
					currentEnd++;

				a[i] = int.Parse(str.AsSpan(currentStart, currentEnd - currentStart));
				currentStart = currentEnd + 1;
			}

			a[^1] = int.Parse(str.AsSpan(currentStart, str.Length - currentStart));
			return a;
		}
	}
}


namespace Csharp_Contest
{
    using System;
    using System.Collections.Generic;
    using System.Diagnostics;
    using System.Globalization;
    using System.IO;
    using System.Linq;
    using System.Text;
    using System.Threading;

    /*
     *
     */

    static class Program
    {
        private const int StackSize = 64 * (1 << 20);
        private const int Sz = (int)2e5 + 10;
        private const int Mod = (int)1e9 + 7;
        private static readonly int[,] dp = new int[101, Sz];
        private static readonly int[,] cp = new int[101, Sz];
        private static List<int> ar;

        private static void Solve()
        {
            int n = NextInt();
            ar = Repeat(0, n).Select(_ => NextInt()).ToList();
            int sum = ar.Aggregate((s, n) => s + n);
            for (int i = 0; i <= n; i++)
            {
                for (int j = 0; j < Sz; j++)
                {
                    dp[i, j] = -1;
                    cp[i, j] = -1;
                }
            }

            if (sum % 2 == 1 || Possible(n - 1, sum / 2) == 0)
            {
                OutputPrinter.WriteLine(0);
            }
            else if (ar.Any(x => x % 2 != 0))
            {
                OutputPrinter.WriteLine(1);
                OutputPrinter.WriteLine(ar.FindIndex(x => x % 2 != 0) + 1);
            }
            else
            {
                int minNow = 105;
                int chosen = -1;
                for (int i = sum; i >= 0; i -= 2)
                {
                    if (Possible(n - 1, i) == 1 && Possible(n - 1, i / 2) == 0)
                    {
                        int step = CountStep(n - 1, sum - i);
                        if (minNow > step)
                        {
                            minNow = step;
                            chosen = sum - i;
                        }
                    }
                }

                if (chosen == -1)
                {
                    throw new Exception("Not supposed to reach!");
                }

                OutputPrinter.WriteLine(minNow);
                PrintChosenSet(n - 1, chosen);
            }
        }

        private static void PrintChosenSet(int n, int sum)
        {
            if (sum < 0)
            {
                throw new Exception("Not supposed to reach!");
            }

            if (n < 0)
            {
                OutputPrinter.WriteLine();
                return;
            }

            if (Possible(n - 1, sum - ar[n]) == 1)
            {
                OutputPrinter.Write($"{n + 1} ");
                PrintChosenSet(n - 1, sum - ar[n]);
                return;
            }

            if (Possible(n - 1, sum) == 1)
            {
                PrintChosenSet(n - 1, sum);
                return;
            }

            throw new Exception("Not supposed to reach!");
        }

        private static int CountStep(int n, int sum)
        {
            if (sum < 0)
            {
                return 105;
            }

            if (n < 0)
            {
                return sum == 0 ? 0 : 105;
            }

            if (dp[n, sum] != -1)
            {
                return dp[n, sum];
            }

            dp[n, sum] = 105;
            dp[n, sum] = Math.Min(dp[n, sum], Possible(n - 1, sum - ar[n]) + 1);
            dp[n, sum] = Math.Min(dp[n, sum], Possible(n - 1, sum));

            return dp[n, sum];
        }

        private static int Possible(int n, int sum)
        {
            if (sum < 0)
            {
                return 0;
            }

            if (n < 0)
            {
                return sum == 0 ? 1 : 0;
            }

            if (dp[n, sum] != -1)
            {
                return dp[n, sum];
            }

            dp[n, sum] = 0;
            dp[n, sum] |= Possible(n - 1, sum - ar[n]);
            dp[n, sum] |= Possible(n - 1, sum);

            return dp[n, sum];
        }

        public static void Main(string[] args)
        {
#if CLown1331
            for (int testCase = 0; testCase < 5; testCase++)
            {
                Solve();
                OutputPrinter.WriteLine($"-------");
            }

            Utils.CreateFileForSubmission();
            if (Debugger.IsAttached) Thread.Sleep(Timeout.Infinite);
#else
            Thread t = new Thread(Solve, StackSize);
            t.Start();
            t.Join();
#endif
            OutputPrinter.Flush();
            ErrorPrinter.Flush();
        }

        private static int NextInt() => int.Parse(Reader.NextString());

        private static long NextLong() => long.Parse(Reader.NextString());

        private static double NextDouble() => double.Parse(Reader.NextString());

        private static string NextString() => Reader.NextString();

        private static string NextLine() => Reader.ReadLine();

        private static IEnumerable<T> OrderByRand<T>(this IEnumerable<T> x) => x.OrderBy(_ => XorShift);

        private static long Count<T>(this IEnumerable<T> x, Func<T, bool> pred) => Enumerable.Count(x, pred);

        private static IEnumerable<T> Repeat<T>(T v, long n) => Enumerable.Repeat<T>(v, (int)n);

        private static IEnumerable<int> Range(long s, long c) => Enumerable.Range((int)s, (int)c);

        private static uint XorShift
        {
            get
            {
                Xsc().MoveNext();
                return Xsc().Current;
            }
        }

        private static IEnumerator<uint> Xsc()
        {
            uint x = 123456789, y = 362436069, z = 521288629, w = (uint)(DateTime.Now.Ticks & 0xffffffff);
            while (true)
            {
                uint t = x ^ (x << 11);
                x = y;
                y = z;
                z = w;
                w = (w ^ (w >> 19)) ^ (t ^ (t >> 8));
                yield return w;
            }
        }

        private static class Reader
        {
            private static readonly Queue<string> Param = new Queue<string>();
#if CLown1331
            private static readonly StreamReader InputReader = new StreamReader("input.txt");
#else
            private static readonly StreamReader InputReader = new StreamReader(Console.OpenStandardInput());
#endif

            public static string NextString()
            {
                if (Param.Count == 0)
                {
                    foreach (string item in ReadLine().Split(' '))
                    {
                        if (string.IsNullOrWhiteSpace(item))
                        {
                            continue;
                        }

                        Param.Enqueue(item);
                    }
                }

                return Param.Dequeue();
            }

            public static string ReadLine()
            {
                return InputReader.ReadLine();
            }
        }

        private static readonly Printer OutputPrinter = new Printer(Console.OpenStandardOutput());

        private static readonly Printer ErrorPrinter = new Printer(Console.OpenStandardError());

        private sealed class Printer : StreamWriter
        {
            public Printer(Stream stream)
                : base(stream, new UTF8Encoding(false, true))
            {
                this.AutoFlush = false;
            }

            public Printer(Stream stream, Encoding encoding)
                : base(stream, encoding)
            {
                this.AutoFlush = false;
            }

            public override IFormatProvider FormatProvider => CultureInfo.InvariantCulture;
        }
    }
}


using System;
using System.Linq;

class C
{
	static int[] Read() => Array.ConvertAll(Console.ReadLine().Split(), int.Parse);
	static (int, int) Read2() { var a = Read(); return (a[0], a[1]); }
	static long[] ReadL() => Array.ConvertAll(Console.ReadLine().Split(), long.Parse);
	static void Main() => Console.WriteLine(Solve());
	static object Solve()
	{
		var n = int.Parse(Console.ReadLine());
		var a = Read();

		var sum = a.Sum();
		if (sum % 2 != 0) return 0;

		var u = Comb(n, a, sum);
		if (!u[sum / 2]) return 0;

		while (true)
		{
			var odds = Enumerable.Range(0, n).Where(i => a[i] % 2 == 1).ToArray();
			if (odds.Any()) return $"1\n{odds[0] + 1}";

			a = a.Select(x => x / 2).ToArray();
		}
	}

	static bool[] Comb(int n, int[] a, int max)
	{
		var u = new bool[max + 1];
		u[0] = true;

		for (int i = 0; i < n; i++)
		{
			for (int j = max; j >= 0; j--)
			{
				if (u[j])
				{
					u[j + a[i]] = true;
				}
			}
		}
		return u;
	}
}


using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading;

// (づ°ω°)づﾐe★゜・。。・゜゜・。。・゜☆゜・。。・゜゜・。。・゜
public class Solution
{
    bool Fun(int[] a, int n)
    {
        int s = a.Sum();
        if (s % 2 > 0)
            return false;

        s /= 2;
        var dp = new bool[n + 1, s + 1];
        for (int i = 0; i <= n; i++)
            dp[i, 0] = true;
        for (int i = 1; i <= n; i++)
            for (int j = 1; j <= s; j++)
            {
                dp[i, j] = dp[i - 1, j];
                if (j >= a[i - 1])
                    dp[i, j] |= dp[i - 1, j - a[i - 1]];
            }

        return dp[n, s];
    }

    public void Solve()
    {
        int n = ReadInt();
        var a = ReadIntArray();

        if (!Fun(a, n))
            Write(0);
        else
        {
            Write(1);
            while (a.All(_ => _ % 2 == 0))
                a = a.Select(_ => _ / 2).ToArray();
            for (int i = 0; ; i++)
                if (a[i] % 2 > 0)
                {
                    Write(i + 1);
                    break;
                }
        }
    }

    #region Main

    protected static TextReader reader;
    protected static TextWriter writer;
    static void Main()
    {
#if DEBUGLOCAL
        reader = new StreamReader("..\\..\\input.txt");
        //reader = new StreamReader(Console.OpenStandardInput());
        writer = Console.Out;
        //writer = new StreamWriter("..\\..\\output.txt");
#else
        reader = new StreamReader(Console.OpenStandardInput());
        writer = new StreamWriter(Console.OpenStandardOutput());
        //reader = new StreamReader("ysys.in");
        //writer = new StreamWriter("output.txt");
#endif
        try
        {
            new Solution().Solve();
            //var thread = new Thread(new Solution().Solve, 1024 * 1024 * 128);
            //thread.Start();
            //thread.Join();
        }
        catch (Exception ex)
        {
#if DEBUGLOCAL
            Console.WriteLine(ex);
#else
            throw;
#endif
        }
        reader.Close();
        writer.Close();
    }

    #endregion

    #region Read / Write
    private static Queue<string> currentLineTokens = new Queue<string>();
    private static string[] ReadAndSplitLine() { return reader.ReadLine().Split(new[] { ' ', '\t', }, StringSplitOptions.RemoveEmptyEntries); }
    public static string ReadToken() { while (currentLineTokens.Count == 0) currentLineTokens = new Queue<string>(ReadAndSplitLine()); return currentLineTokens.Dequeue(); }
    public static int ReadInt() { return int.Parse(ReadToken()); }
    public static long ReadLong() { return long.Parse(ReadToken()); }
    public static double ReadDouble() { return double.Parse(ReadToken(), CultureInfo.InvariantCulture); }
    public static int[] ReadIntArray() { return ReadAndSplitLine().Select(int.Parse).ToArray(); }
    public static long[] ReadLongArray() { return ReadAndSplitLine().Select(long.Parse).ToArray(); }
    public static double[] ReadDoubleArray() { return ReadAndSplitLine().Select(s => double.Parse(s, CultureInfo.InvariantCulture)).ToArray(); }
    public static int[][] ReadIntMatrix(int numberOfRows) { int[][] matrix = new int[numberOfRows][]; for (int i = 0; i < numberOfRows; i++) matrix[i] = ReadIntArray(); return matrix; }
    public static int[][] ReadAndTransposeIntMatrix(int numberOfRows)
    {
        int[][] matrix = ReadIntMatrix(numberOfRows); int[][] ret = new int[matrix[0].Length][];
        for (int i = 0; i < ret.Length; i++) { ret[i] = new int[numberOfRows]; for (int j = 0; j < numberOfRows; j++) ret[i][j] = matrix[j][i]; }
        return ret;
    }
    public static string[] ReadLines(int quantity) { string[] lines = new string[quantity]; for (int i = 0; i < quantity; i++) lines[i] = reader.ReadLine().Trim(); return lines; }
    public static void WriteArray<T>(IEnumerable<T> array) { writer.WriteLine(string.Join(" ", array)); }
    public static void Write(params object[] array) { WriteArray(array); }
    public static void WriteLines<T>(IEnumerable<T> array) { foreach (var a in array) writer.WriteLine(a); }
    private class SDictionary<TKey, TValue> : Dictionary<TKey, TValue>
    {
        public new TValue this[TKey key]
        {
            get { return ContainsKey(key) ? base[key] : default(TValue); }
            set { base[key] = value; }
        }
    }
    private static T[] Init<T>(int size) where T : new() { var ret = new T[size]; for (int i = 0; i < size; i++) ret[i] = new T(); return ret; }
    #endregion
}


namespace Csharp_Contest
{
    using System;
    using System.Collections.Generic;
    using System.Diagnostics;
    using System.Globalization;
    using System.IO;
    using System.Linq;
    using System.Text;
    using System.Threading;

    /*
     * #import_BitMap.cs
     */

    static class Program
    {
        private const int StackSize = 32 * (1 << 20);
        private const int Sz = (int)2e5 + 10;
        private const int Mod = (int)1e9 + 7;
        private static int n;
        private static BitMap dp;
        private static BitMap vp;
        private static List<int> ar;

        private static void Solve()
        {
            int n = NextInt();
            dp = new BitMap(n, Sz);
            vp = new BitMap(n, Sz);
            ar = Repeat(0, n).Select(_ => NextInt()).ToList();
            int sum = ar.Aggregate((s, n) => s + n);
            if (sum % 2 == 1 || !Possible(n - 1, n, 0, 0))
            {
                OutputPrinter.WriteLine(0);
            }
            else
            {
                for (int i = 0; i < n; i++)
                {
                    dp.Clear();
                    vp.Clear();
                    if (!Possible(n - 1, i, 0, 0))
                    {
                        OutputPrinter.WriteLine(1);
                        OutputPrinter.WriteLine(i + 1);
                        break;
                    }
                }
            }
        }

        private static bool Possible(int x, int skip, int sumLeft, int sumRight)
        {
            if (x < 0)
            {
                return sumLeft == sumRight;
            }

            if (vp[x, sumLeft])
            {
                return dp[x, sumLeft];
            }

            vp[x, sumLeft] = true;

            if (x == skip)
            {
                return dp[x, sumLeft] = Possible(x - 1, skip, sumLeft, sumRight);
            }

            dp[x, sumLeft] = dp[x, sumLeft] || Possible(x - 1, skip, sumLeft + ar[x], sumRight);
            dp[x, sumLeft] = dp[x, sumLeft] || Possible(x - 1, skip, sumLeft, sumRight + ar[x]);

            return dp[x, sumLeft];
        }

        public static void Main(string[] args)
        {
#if CLown1331
            for (int testCase = 0; testCase < 4; testCase++)
            {
                Solve();
            }

            Utils.CreateFileForSubmission();
            if (Debugger.IsAttached) Thread.Sleep(Timeout.Infinite);
#else
            Thread t = new Thread(Solve, StackSize);
            t.Start();
            t.Join();
#endif
            OutputPrinter.Flush();
            ErrorPrinter.Flush();
        }

        private static int NextInt() => int.Parse(Reader.NextString());

        private static long NextLong() => long.Parse(Reader.NextString());

        private static double NextDouble() => double.Parse(Reader.NextString());

        private static string NextString() => Reader.NextString();

        private static string NextLine() => Reader.ReadLine();

        private static IEnumerable<T> OrderByRand<T>(this IEnumerable<T> x) => x.OrderBy(_ => XorShift);

        private static long Count<T>(this IEnumerable<T> x, Func<T, bool> pred) => Enumerable.Count(x, pred);

        private static IEnumerable<T> Repeat<T>(T v, long n) => Enumerable.Repeat<T>(v, (int)n);

        private static IEnumerable<int> Range(long s, long c) => Enumerable.Range((int)s, (int)c);

        private static uint XorShift
        {
            get
            {
                Xsc().MoveNext();
                return Xsc().Current;
            }
        }

        private static IEnumerator<uint> Xsc()
        {
            uint x = 123456789, y = 362436069, z = 521288629, w = (uint)(DateTime.Now.Ticks & 0xffffffff);
            while (true)
            {
                uint t = x ^ (x << 11);
                x = y;
                y = z;
                z = w;
                w = (w ^ (w >> 19)) ^ (t ^ (t >> 8));
                yield return w;
            }
        }

        private static class Reader
        {
            private static readonly Queue<string> Param = new Queue<string>();
#if CLown1331
            private static readonly StreamReader InputReader = new StreamReader("input.txt");
#else
            private static readonly StreamReader InputReader = new StreamReader(Console.OpenStandardInput());
#endif

            public static string NextString()
            {
                if (Param.Count == 0)
                {
                    foreach (string item in ReadLine().Split(' '))
                    {
                        if (string.IsNullOrWhiteSpace(item))
                        {
                            continue;
                        }

                        Param.Enqueue(item);
                    }
                }

                return Param.Dequeue();
            }

            public static string ReadLine()
            {
                return InputReader.ReadLine();
            }
        }

        private static readonly Printer OutputPrinter = new Printer(Console.OpenStandardOutput());

        private static readonly Printer ErrorPrinter = new Printer(Console.OpenStandardError());

        private sealed class Printer : StreamWriter
        {
            public Printer(Stream stream)
                : base(stream, new UTF8Encoding(false, true))
            {
                this.AutoFlush = false;
            }

            public Printer(Stream stream, Encoding encoding)
                : base(stream, encoding)
            {
                this.AutoFlush = false;
            }

            public override IFormatProvider FormatProvider => CultureInfo.InvariantCulture;
        }
    }
}
namespace Csharp_Contest
{
    using System;
    using System.Collections;
    using System.Linq;

    public class BitMap
    {
        private readonly BitArray bitArray;
        private readonly int[] dimensions;

        public BitMap(params int[] dimensions)
        {
            this.dimensions = dimensions;
            this.bitArray = new BitArray(this.dimensions.Aggregate((s, n) => s * n));
        }

        public void Clear()
        {
            this.bitArray.SetAll(false);
        }

        public void SetValue(bool value, params int[] indexes)
        {
            this.ValidateIndexes(indexes);
            this.bitArray[this.GetIndex(indexes)] = value;
        }

        public bool GetValue(int[] indexes)
        {
            this.ValidateIndexes(indexes);
            return this.bitArray[this.GetIndex(indexes)];
        }

        public bool this[params int[] indexes]
        {
            get => this.GetValue(indexes);
            set => this.SetValue(value, indexes);
        }

        private void ValidateIndexes(int[] indexes)
        {
            if (indexes.Length != this.dimensions.Length)
            {
                throw new Exception("Number of indexes != _dimensions");
            }

            for (int i = 0; i < indexes.Length; i++)
            {
                if (indexes[i] < 0 || indexes[i] >= this.dimensions[i])
                {
                    throw new IndexOutOfRangeException();
                }
            }
        }

        private int GetIndex(int[] indexes)
        {
            int ret = 0;
            int power = 1;
            for (int i = 1; i <= indexes.Length; i++)
            {
                ret += power * indexes[^i];
                power *= this.dimensions[^i];
            }

            return ret;
        }
    }
}


namespace CLown1331
{
    using System;
    using System.Collections.Generic;
    using System.Diagnostics;
    using System.Globalization;
    using System.IO;
    using System.Linq;
    using System.Text;
    using System.Threading;
    using Library.LongMatrix;

    /*
     *
     */

    static class Program
    {
        private const int NumberOfTestCase = 4;
        private const int StackSize = 64 * (1 << 20);
        private const int Sz = (int)2e5 + 10;
        private const int Mod = (int)1e9 + 7;
        private static int n;
        private static int[] dp;
        private static List<int> ar;

        private static void Solve()
        {
            new LongMatrix(2, 3);
            n = NextInt();
            dp = new int[Sz];
            ar = Repeat(0, n).Select(_ => NextInt()).ToList();
            int sum = ar.Aggregate((s, n) => s + n);
            if (sum % 2 == 1 || !Possible(n, sum))
            {
                OutputPrinter.WriteLine(0);
            }
            else
            {
                for (int i = 0; i < n; i++)
                {
                    if (!Possible(i, sum))
                    {
                        OutputPrinter.WriteLine(1);
                        OutputPrinter.WriteLine(i + 1);
                        break;
                    }
                }
            }
        }

        private static bool Possible(int skip, int sum)
        {
            for (int j = sum; j >= 0; j--)
            {
                dp[j] = 0;
            }

            dp[0] = 1;
            for (int i = 0; i < n; i++)
            {
                if (i == skip)
                {
                    continue;
                }

                for (int j = sum; j >= ar[i]; j--)
                {
                    dp[j] |= dp[j - ar[i]];
                }
            }

            int maxPossible = -1;
            for (int j = sum; j >= 0; j--)
            {
                if (dp[j] == 1)
                {
                    maxPossible = j;
                    break;
                }
            }

            return !(maxPossible == -1 || maxPossible % 2 == 1 || dp[maxPossible / 2] != 1);
        }

        public static void Main(string[] args)
        {
#if CLown1331
            for (int testCase = 0; testCase < NumberOfTestCase; testCase++)
            {
                Solve();
            }

            Utils.CreateFileForSubmission();
            if (Debugger.IsAttached) Thread.Sleep(Timeout.Infinite);
#else
            Thread t = new Thread(Solve, StackSize);
            t.Start();
            t.Join();
#endif
            OutputPrinter.Flush();
            ErrorPrinter.Flush();
        }

        private static int NextInt() => int.Parse(Reader.NextString());

        private static long NextLong() => long.Parse(Reader.NextString());

        private static double NextDouble() => double.Parse(Reader.NextString());

        private static string NextString() => Reader.NextString();

        private static string NextLine() => Reader.ReadLine();

        private static IEnumerable<T> OrderByRand<T>(this IEnumerable<T> x) => x.OrderBy(_ => XorShift);

        private static long Count<T>(this IEnumerable<T> x, Func<T, bool> pred) => Enumerable.Count(x, pred);

        private static IEnumerable<T> Repeat<T>(T v, long n) => Enumerable.Repeat<T>(v, (int)n);

        private static IEnumerable<int> Range(long s, long c) => Enumerable.Range((int)s, (int)c);

        private static uint XorShift
        {
            get
            {
                Xsc().MoveNext();
                return Xsc().Current;
            }
        }

        private static IEnumerator<uint> Xsc()
        {
            uint x = 123456789, y = 362436069, z = 521288629, w = (uint)(DateTime.Now.Ticks & 0xffffffff);
            while (true)
            {
                uint t = x ^ (x << 11);
                x = y;
                y = z;
                z = w;
                w = (w ^ (w >> 19)) ^ (t ^ (t >> 8));
                yield return w;
            }
        }

        private static class Reader
        {
            private static readonly Queue<string> Param = new Queue<string>();
#if CLown1331
            private static readonly StreamReader InputReader = new StreamReader("input.txt");
#else
            private static readonly StreamReader InputReader = new StreamReader(Console.OpenStandardInput());
#endif

            public static string NextString()
            {
                if (Param.Count == 0)
                {
                    foreach (string item in ReadLine().Split(' '))
                    {
                        if (string.IsNullOrWhiteSpace(item))
                        {
                            continue;
                        }

                        Param.Enqueue(item);
                    }
                }

                return Param.Dequeue();
            }

            public static string ReadLine()
            {
                return InputReader.ReadLine();
            }
        }

        private static readonly Printer OutputPrinter = new Printer(Console.OpenStandardOutput());

        private static readonly Printer ErrorPrinter = new Printer(Console.OpenStandardError());

        private sealed class Printer : StreamWriter
        {
            public Printer(Stream stream)
                : base(stream, new UTF8Encoding(false, true))
            {
                this.AutoFlush = false;
            }

            public Printer(Stream stream, Encoding encoding)
                : base(stream, encoding)
            {
                this.AutoFlush = false;
            }

            public override IFormatProvider FormatProvider => CultureInfo.InvariantCulture;
        }
    }
}
namespace Library.LongMatrix
{
    using Library.Matrix;
/*
 * #import_Matrix.cs
 */
    public class LongMatrix: Matrix<long>
    {
        private readonly long mod;

        public LongMatrix(int size, long mod) : base(size)
        {
            this.mod = mod;
        }

        public override void Identity()
        {
            for (int i = 0; i < this.Size; i++)
            {
                for (int j = 0; j < this.Size; j++)
                {
                    this[i, j] = (i == j) ? 1 : 0;
                }
            }
        }

        protected override Matrix<long> Add(Matrix<long> right)
        {
            LongMatrix temp = new LongMatrix(this.Size, this.mod);
            temp.Reset();
            for (int i = 0; i < this.Size; i++)
            {
                for (int j = 0; j < this.Size; j++)
                {
                    temp[i, j] = (this[i, j] + right[i, j]) % this.mod;
                    while (temp[i, j] >= this.mod)
                    {
                        temp[i, j] -= this.mod;
                    }
                }
            }

            return temp;
        }

        protected override Matrix<long> Multiply(Matrix<long> right)
        {
            LongMatrix temp = new LongMatrix(this.Size, this.mod);
            temp.Reset();
            for (int i = 0; i < this.Size; i++)
            {
                for (int j = 0; j < this.Size; j++)
                {
                    for (int k = 0; k < this.Size; k++)
                    {
                        temp[i, k] += (this[i, j] * right[j, k]) % this.mod;
                        while (temp[i, k] >= this.mod)
                        {
                            temp[i, k] -= this.mod;
                        }
                    }
                }
            }

            return temp;
        }

        protected override Matrix<long> Power(long power)
        {
            LongMatrix ans = new LongMatrix(this.Size, this.mod);
            ans.Identity();
            LongMatrix num = this;
            for (; power > 0; power >>= 1)
            {
                if (power % 2 == 1)
                {
                    ans = (LongMatrix)(ans * num);
                }

                num = (LongMatrix)(num * num);
            }

            return ans;
        }
    }
}
namespace Library.Matrix
{
    public abstract class Matrix<T>
    {
        private T[,] a;
        private readonly int size;

        protected Matrix(int size)
        {
            this.size = size;
            this.a = new T[this.size, this.size];
        }

        public void Reset()
        {
            for (int i = 0; i < this.size; i++)
            {
                for (int j = 0; j < this.size; j++)
                {
                    this[i, j] = default(T);
                }
            }
        }

        public abstract void Identity();

        public static Matrix<T> operator+ (Matrix<T> a, Matrix<T> b)
        {
            return a.Add(b);
        }

        protected abstract Matrix<T> Add(Matrix<T> right);

        public static Matrix<T> operator *(Matrix<T> a, Matrix<T> b)
        {
            return a.Multiply(b);
        }

        protected abstract Matrix<T> Multiply(Matrix<T> right);

        public static Matrix<T> operator ^(Matrix<T> a, long power)
        {
            return a.Power(power);
        }

        public static Matrix<T> operator ^(Matrix<T> a, int power)
        {
            return a.Power(power);
        }

        public T this[int i, int j]
        {
            get => this.a[i, j];
            set => this.a[i, j] = value;
        }

        protected abstract Matrix<T> Power(long power);

        public int Size => this.size;
    }
}


namespace CLown1331
{
    using System;
    using System.Collections.Generic;
    using System.Diagnostics;
    using System.Globalization;
    using System.IO;
    using System.Linq;
    using System.Text;
    using System.Threading;

    /*
     * #import_BitMap.cs
     */

    static class Program
    {
        private const int NumberOfTestCase = 4;
        private const int StackSize = 64 * (1 << 20);
        private const int Sz = (int)2e5 + 10;
        private const int Mod = (int)1e9 + 7;
        private static int n;
        private static BitMap dp;
        private static BitMap vp;
        private static List<int> ar;

        private static void Solve()
        {
            n = NextInt();
            dp = new BitMap(Sz);
            ar = Repeat(0, n).Select(_ => NextInt()).ToList();
            int sum = ar.Aggregate((s, n) => s + n);
            if (sum % 2 == 1 || !Possible(n, sum))
            {
                OutputPrinter.WriteLine(0);
            }
            else
            {
                for (int i = 0; i < n; i++)
                {
                    if (!Possible(i, sum))
                    {
                        OutputPrinter.WriteLine(1);
                        OutputPrinter.WriteLine(i + 1);
                        break;
                    }
                }
            }
        }

        private static bool Possible(int skip, int sum)
        {
            dp.Clear();
            dp[0] = true;
            for (int i = 0; i < n; i++)
            {
                if (i == skip)
                {
                    continue;
                }

                for (int j = sum; j >= ar[i]; j--)
                {
                    dp[j] = dp[j] || dp[j - ar[i]];
                }
            }

            int maxPossible = -1;
            for (int j = sum; j >= 0; j--)
            {
                if (dp[j])
                {
                    maxPossible = j;
                    break;
                }
            }

            return !(maxPossible == -1 || maxPossible % 2 == 1 || !dp[maxPossible / 2]);
        }

        public static void Main(string[] args)
        {
#if CLown1331
            for (int testCase = 0; testCase < NumberOfTestCase; testCase++)
            {
                Solve();
            }

            Utils.CreateFileForSubmission();
            if (Debugger.IsAttached) Thread.Sleep(Timeout.Infinite);
#else
            Thread t = new Thread(Solve, StackSize);
            t.Start();
            t.Join();
#endif
            OutputPrinter.Flush();
            ErrorPrinter.Flush();
        }

        private static int NextInt() => int.Parse(Reader.NextString());

        private static long NextLong() => long.Parse(Reader.NextString());

        private static double NextDouble() => double.Parse(Reader.NextString());

        private static string NextString() => Reader.NextString();

        private static string NextLine() => Reader.ReadLine();

        private static IEnumerable<T> OrderByRand<T>(this IEnumerable<T> x) => x.OrderBy(_ => XorShift);

        private static long Count<T>(this IEnumerable<T> x, Func<T, bool> pred) => Enumerable.Count(x, pred);

        private static IEnumerable<T> Repeat<T>(T v, long n) => Enumerable.Repeat<T>(v, (int)n);

        private static IEnumerable<int> Range(long s, long c) => Enumerable.Range((int)s, (int)c);

        private static uint XorShift
        {
            get
            {
                Xsc().MoveNext();
                return Xsc().Current;
            }
        }

        private static IEnumerator<uint> Xsc()
        {
            uint x = 123456789, y = 362436069, z = 521288629, w = (uint)(DateTime.Now.Ticks & 0xffffffff);
            while (true)
            {
                uint t = x ^ (x << 11);
                x = y;
                y = z;
                z = w;
                w = (w ^ (w >> 19)) ^ (t ^ (t >> 8));
                yield return w;
            }
        }

        private static class Reader
        {
            private static readonly Queue<string> Param = new Queue<string>();
#if CLown1331
            private static readonly StreamReader InputReader = new StreamReader("input.txt");
#else
            private static readonly StreamReader InputReader = new StreamReader(Console.OpenStandardInput());
#endif

            public static string NextString()
            {
                if (Param.Count == 0)
                {
                    foreach (string item in ReadLine().Split(' '))
                    {
                        if (string.IsNullOrWhiteSpace(item))
                        {
                            continue;
                        }

                        Param.Enqueue(item);
                    }
                }

                return Param.Dequeue();
            }

            public static string ReadLine()
            {
                return InputReader.ReadLine();
            }
        }

        private static readonly Printer OutputPrinter = new Printer(Console.OpenStandardOutput());

        private static readonly Printer ErrorPrinter = new Printer(Console.OpenStandardError());

        private sealed class Printer : StreamWriter
        {
            public Printer(Stream stream)
                : base(stream, new UTF8Encoding(false, true))
            {
                this.AutoFlush = false;
            }

            public Printer(Stream stream, Encoding encoding)
                : base(stream, encoding)
            {
                this.AutoFlush = false;
            }

            public override IFormatProvider FormatProvider => CultureInfo.InvariantCulture;
        }
    }
}
namespace CLown1331
{
    using System;
    using System.Collections;
    using System.Linq;

    public class BitMap
    {
        private readonly BitArray bitArray;
        private readonly int[] dimensions;

        public BitMap(params int[] dimensions)
        {
            this.dimensions = dimensions;
            this.bitArray = new BitArray(this.dimensions.Aggregate((s, n) => s * n));
        }

        public void Clear()
        {
            this.bitArray.SetAll(false);
        }

        public void SetValue(bool value, params int[] indexes)
        {
            this.ValidateIndexes(indexes);
            this.bitArray[this.GetIndex(indexes)] = value;
        }

        public bool GetValue(int[] indexes)
        {
            this.ValidateIndexes(indexes);
            return this.bitArray[this.GetIndex(indexes)];
        }

        public bool this[params int[] indexes]
        {
            get => this.GetValue(indexes);
            set => this.SetValue(value, indexes);
        }

        private void ValidateIndexes(int[] indexes)
        {
            if (indexes.Length != this.dimensions.Length)
            {
                throw new Exception("Number of indexes != _dimensions");
            }

            for (int i = 0; i < indexes.Length; i++)
            {
                if (indexes[i] < 0 || indexes[i] >= this.dimensions[i])
                {
                    throw new IndexOutOfRangeException();
                }
            }
        }

        private int GetIndex(int[] indexes)
        {
            int ret = 0;
            int power = 1;
            for (int i = 1; i <= indexes.Length; i++)
            {
                ret += power * indexes[^i];
                power *= this.dimensions[^i];
            }

            return ret;
        }
    }
}


namespace CLown1331
{
    using System;
    using System.Collections.Generic;
    using System.Diagnostics;
    using System.Globalization;
    using System.IO;
    using System.Linq;
    using System.Text;
    using System.Threading;

    /*
     * #import_BitMap.cs
     */

    static class Program
    {
        private const int NumberOfTestCase = 4;
        private const int StackSize = 64 * (1 << 20);
        private const int Sz = (int)2e5 + 10;
        private const int Mod = (int)1e9 + 7;
        private static int n;
        private static int[] dp;
        private static List<int> ar;

        private static void Solve()
        {
            n = NextInt();
            dp = new int[Sz];
            ar = Repeat(0, n).Select(_ => NextInt()).ToList();
            int sum = ar.Aggregate((s, n) => s + n);
            if (sum % 2 == 1 || !Possible(n, sum))
            {
                OutputPrinter.WriteLine(0);
            }
            else
            {
                for (int i = 0; i < n; i++)
                {
                    if (!Possible(i, sum))
                    {
                        OutputPrinter.WriteLine(1);
                        OutputPrinter.WriteLine(i + 1);
                        break;
                    }
                }
            }
        }

        private static bool Possible(int skip, int sum)
        {
            for (int j = sum; j >= 0; j--)
            {
                dp[j] = 0;
            }

            dp[0] = 1;
            for (int i = 0; i < n; i++)
            {
                if (i == skip)
                {
                    continue;
                }

                for (int j = sum; j >= ar[i]; j--)
                {
                    dp[j] |= dp[j - ar[i]];
                }
            }

            int maxPossible = -1;
            for (int j = sum; j >= 0; j--)
            {
                if (dp[j] == 1)
                {
                    maxPossible = j;
                    break;
                }
            }

            return !(maxPossible == -1 || maxPossible % 2 == 1 || dp[maxPossible / 2] != 1);
        }

        public static void Main(string[] args)
        {
#if CLown1331
            for (int testCase = 0; testCase < NumberOfTestCase; testCase++)
            {
                Solve();
            }

            Utils.CreateFileForSubmission();
            if (Debugger.IsAttached) Thread.Sleep(Timeout.Infinite);
#else
            Thread t = new Thread(Solve, StackSize);
            t.Start();
            t.Join();
#endif
            OutputPrinter.Flush();
            ErrorPrinter.Flush();
        }

        private static int NextInt() => int.Parse(Reader.NextString());

        private static long NextLong() => long.Parse(Reader.NextString());

        private static double NextDouble() => double.Parse(Reader.NextString());

        private static string NextString() => Reader.NextString();

        private static string NextLine() => Reader.ReadLine();

        private static IEnumerable<T> OrderByRand<T>(this IEnumerable<T> x) => x.OrderBy(_ => XorShift);

        private static long Count<T>(this IEnumerable<T> x, Func<T, bool> pred) => Enumerable.Count(x, pred);

        private static IEnumerable<T> Repeat<T>(T v, long n) => Enumerable.Repeat<T>(v, (int)n);

        private static IEnumerable<int> Range(long s, long c) => Enumerable.Range((int)s, (int)c);

        private static uint XorShift
        {
            get
            {
                Xsc().MoveNext();
                return Xsc().Current;
            }
        }

        private static IEnumerator<uint> Xsc()
        {
            uint x = 123456789, y = 362436069, z = 521288629, w = (uint)(DateTime.Now.Ticks & 0xffffffff);
            while (true)
            {
                uint t = x ^ (x << 11);
                x = y;
                y = z;
                z = w;
                w = (w ^ (w >> 19)) ^ (t ^ (t >> 8));
                yield return w;
            }
        }

        private static class Reader
        {
            private static readonly Queue<string> Param = new Queue<string>();
#if CLown1331
            private static readonly StreamReader InputReader = new StreamReader("input.txt");
#else
            private static readonly StreamReader InputReader = new StreamReader(Console.OpenStandardInput());
#endif

            public static string NextString()
            {
                if (Param.Count == 0)
                {
                    foreach (string item in ReadLine().Split(' '))
                    {
                        if (string.IsNullOrWhiteSpace(item))
                        {
                            continue;
                        }

                        Param.Enqueue(item);
                    }
                }

                return Param.Dequeue();
            }

            public static string ReadLine()
            {
                return InputReader.ReadLine();
            }
        }

        private static readonly Printer OutputPrinter = new Printer(Console.OpenStandardOutput());

        private static readonly Printer ErrorPrinter = new Printer(Console.OpenStandardError());

        private sealed class Printer : StreamWriter
        {
            public Printer(Stream stream)
                : base(stream, new UTF8Encoding(false, true))
            {
                this.AutoFlush = false;
            }

            public Printer(Stream stream, Encoding encoding)
                : base(stream, encoding)
            {
                this.AutoFlush = false;
            }

            public override IFormatProvider FormatProvider => CultureInfo.InvariantCulture;
        }
    }
}
namespace CLown1331
{
    using System;
    using System.Collections;
    using System.Linq;

    public class BitMap
    {
        private readonly BitArray bitArray;
        private readonly int[] dimensions;

        public BitMap(params int[] dimensions)
        {
            this.dimensions = dimensions;
            this.bitArray = new BitArray(this.dimensions.Aggregate((s, n) => s * n));
        }

        public void Clear()
        {
            this.bitArray.SetAll(false);
        }

        public void SetValue(bool value, params int[] indexes)
        {
            this.ValidateIndexes(indexes);
            this.bitArray[this.GetIndex(indexes)] = value;
        }

        public bool GetValue(int[] indexes)
        {
            this.ValidateIndexes(indexes);
            return this.bitArray[this.GetIndex(indexes)];
        }

        public bool this[params int[] indexes]
        {
            get => this.GetValue(indexes);
            set => this.SetValue(value, indexes);
        }

        private void ValidateIndexes(int[] indexes)
        {
            if (indexes.Length != this.dimensions.Length)
            {
                throw new Exception("Number of indexes != _dimensions");
            }

            for (int i = 0; i < indexes.Length; i++)
            {
                if (indexes[i] < 0 || indexes[i] >= this.dimensions[i])
                {
                    throw new IndexOutOfRangeException();
                }
            }
        }

        private int GetIndex(int[] indexes)
        {
            int ret = 0;
            int power = 1;
            for (int i = 1; i <= indexes.Length; i++)
            {
                ret += power * indexes[^i];
                power *= this.dimensions[^i];
            }

            return ret;
        }
    }
}


namespace CLown1331
{
    using System;
    using System.Collections.Generic;
    using System.Diagnostics;
    using System.Globalization;
    using System.IO;
    using System.Linq;
    using System.Text;
    using System.Threading;

    /*
     *
     */

    static class Program
    {
        private const int NumberOfTestCase = 4;
        private const int StackSize = 64 * (1 << 20);
        private const int Sz = (int)2e5 + 10;
        private const int Mod = (int)1e9 + 7;
        private static int n;
        private static int[] dp;
        private static List<int> ar;

        private static void Solve()
        {
            n = NextInt();
            dp = new int[Sz];
            ar = Repeat(0, n).Select(_ => NextInt()).ToList();
            int sum = ar.Aggregate((s, n) => s + n);
            if (sum % 2 == 1 || !Possible(n, sum))
            {
                OutputPrinter.WriteLine(0);
            }
            else
            {
                for (int i = 0; i < n; i++)
                {
                    if (!Possible(i, sum))
                    {
                        OutputPrinter.WriteLine(1);
                        OutputPrinter.WriteLine(i + 1);
                        break;
                    }
                }
            }
        }

        private static bool Possible(int skip, int sum)
        {
            for (int j = sum; j >= 0; j--)
            {
                dp[j] = 0;
            }

            dp[0] = 1;
            for (int i = 0; i < n; i++)
            {
                if (i == skip)
                {
                    continue;
                }

                for (int j = sum; j >= ar[i]; j--)
                {
                    dp[j] |= dp[j - ar[i]];
                }
            }

            int maxPossible = -1;
            for (int j = sum; j >= 0; j--)
            {
                if (dp[j] == 1)
                {
                    maxPossible = j;
                    break;
                }
            }

            return !(maxPossible == -1 || maxPossible % 2 == 1 || dp[maxPossible / 2] != 1);
        }

        public static void Main(string[] args)
        {
#if CLown1331
            for (int testCase = 0; testCase < NumberOfTestCase; testCase++)
            {
                Solve();
            }

            Utils.CreateFileForSubmission();
            if (Debugger.IsAttached) Thread.Sleep(Timeout.Infinite);
#else
            Thread t = new Thread(Solve, StackSize);
            t.Start();
            t.Join();
#endif
            OutputPrinter.Flush();
            ErrorPrinter.Flush();
        }

        private static int NextInt() => int.Parse(Reader.NextString());

        private static long NextLong() => long.Parse(Reader.NextString());

        private static double NextDouble() => double.Parse(Reader.NextString());

        private static string NextString() => Reader.NextString();

        private static string NextLine() => Reader.ReadLine();

        private static IEnumerable<T> OrderByRand<T>(this IEnumerable<T> x) => x.OrderBy(_ => XorShift);

        private static long Count<T>(this IEnumerable<T> x, Func<T, bool> pred) => Enumerable.Count(x, pred);

        private static IEnumerable<T> Repeat<T>(T v, long n) => Enumerable.Repeat<T>(v, (int)n);

        private static IEnumerable<int> Range(long s, long c) => Enumerable.Range((int)s, (int)c);

        private static uint XorShift
        {
            get
            {
                Xsc().MoveNext();
                return Xsc().Current;
            }
        }

        private static IEnumerator<uint> Xsc()
        {
            uint x = 123456789, y = 362436069, z = 521288629, w = (uint)(DateTime.Now.Ticks & 0xffffffff);
            while (true)
            {
                uint t = x ^ (x << 11);
                x = y;
                y = z;
                z = w;
                w = (w ^ (w >> 19)) ^ (t ^ (t >> 8));
                yield return w;
            }
        }

        private static class Reader
        {
            private static readonly Queue<string> Param = new Queue<string>();
#if CLown1331
            private static readonly StreamReader InputReader = new StreamReader("input.txt");
#else
            private static readonly StreamReader InputReader = new StreamReader(Console.OpenStandardInput());
#endif

            public static string NextString()
            {
                if (Param.Count == 0)
                {
                    foreach (string item in ReadLine().Split(' '))
                    {
                        if (string.IsNullOrWhiteSpace(item))
                        {
                            continue;
                        }

                        Param.Enqueue(item);
                    }
                }

                return Param.Dequeue();
            }

            public static string ReadLine()
            {
                return InputReader.ReadLine();
            }
        }

        private static readonly Printer OutputPrinter = new Printer(Console.OpenStandardOutput());

        private static readonly Printer ErrorPrinter = new Printer(Console.OpenStandardError());

        private sealed class Printer : StreamWriter
        {
            public Printer(Stream stream)
                : base(stream, new UTF8Encoding(false, true))
            {
                this.AutoFlush = false;
            }

            public Printer(Stream stream, Encoding encoding)
                : base(stream, encoding)
            {
                this.AutoFlush = false;
            }

            public override IFormatProvider FormatProvider => CultureInfo.InvariantCulture;
        }
    }
}


namespace CLown1331
{
    using System;
    using System.Collections.Generic;
    using System.Diagnostics;
    using System.Globalization;
    using System.IO;
    using System.Linq;
    using System.Text;
    using System.Threading;

    /*
     *
     */

    static class Program
    {
        private const int NumberOfTestCase = 4;
        private const int StackSize = 64 * (1 << 20);
        private const int Sz = (int)2e5 + 10;
        private const int Mod = (int)1e9 + 7;
        private static int n;
        private static BitMap dp;
        private static BitMap vp;
        private static List<int> ar;

        private static void Solve()
        {
            n = NextInt();
            dp = new BitMap(Sz);
            ar = Repeat(0, n).Select(_ => NextInt()).ToList();
            int sum = ar.Aggregate((s, n) => s + n);
            if (sum % 2 == 1 || !Possible(n, sum))
            {
                OutputPrinter.WriteLine(0);
            }
            else
            {
                for (int i = 0; i < n; i++)
                {
                    if (!Possible(i, sum))
                    {
                        OutputPrinter.WriteLine(1);
                        OutputPrinter.WriteLine(i + 1);
                        break;
                    }
                }
            }
        }

        private static bool Possible(int skip, int sum)
        {
            dp.Clear();
            dp[0] = true;
            for (int i = 0; i < n; i++)
            {
                if (i == skip)
                {
                    continue;
                }

                for (int j = sum; j >= ar[i]; j--)
                {
                    dp[j] = dp[j] || dp[j - ar[i]];
                }
            }

            int maxPossible = -1;
            for (int j = sum; j >= 0; j--)
            {
                if (dp[j])
                {
                    maxPossible = j;
                    break;
                }
            }

            return !(maxPossible == -1 || maxPossible % 2 == 1 || !dp[maxPossible / 2]);
        }

        public static void Main(string[] args)
        {
#if CLown1331
            for (int testCase = 0; testCase < NumberOfTestCase; testCase++)
            {
                Solve();
            }

            Utils.CreateFileForSubmission();
            if (Debugger.IsAttached) Thread.Sleep(Timeout.Infinite);
#else
            Thread t = new Thread(Solve, StackSize);
            t.Start();
            t.Join();
#endif
            OutputPrinter.Flush();
            ErrorPrinter.Flush();
        }

        private static int NextInt() => int.Parse(Reader.NextString());

        private static long NextLong() => long.Parse(Reader.NextString());

        private static double NextDouble() => double.Parse(Reader.NextString());

        private static string NextString() => Reader.NextString();

        private static string NextLine() => Reader.ReadLine();

        private static IEnumerable<T> OrderByRand<T>(this IEnumerable<T> x) => x.OrderBy(_ => XorShift);

        private static long Count<T>(this IEnumerable<T> x, Func<T, bool> pred) => Enumerable.Count(x, pred);

        private static IEnumerable<T> Repeat<T>(T v, long n) => Enumerable.Repeat<T>(v, (int)n);

        private static IEnumerable<int> Range(long s, long c) => Enumerable.Range((int)s, (int)c);

        private static uint XorShift
        {
            get
            {
                Xsc().MoveNext();
                return Xsc().Current;
            }
        }

        private static IEnumerator<uint> Xsc()
        {
            uint x = 123456789, y = 362436069, z = 521288629, w = (uint)(DateTime.Now.Ticks & 0xffffffff);
            while (true)
            {
                uint t = x ^ (x << 11);
                x = y;
                y = z;
                z = w;
                w = (w ^ (w >> 19)) ^ (t ^ (t >> 8));
                yield return w;
            }
        }

        private static class Reader
        {
            private static readonly Queue<string> Param = new Queue<string>();
#if CLown1331
            private static readonly StreamReader InputReader = new StreamReader("input.txt");
#else
            private static readonly StreamReader InputReader = new StreamReader(Console.OpenStandardInput());
#endif

            public static string NextString()
            {
                if (Param.Count == 0)
                {
                    foreach (string item in ReadLine().Split(' '))
                    {
                        if (string.IsNullOrWhiteSpace(item))
                        {
                            continue;
                        }

                        Param.Enqueue(item);
                    }
                }

                return Param.Dequeue();
            }

            public static string ReadLine()
            {
                return InputReader.ReadLine();
            }
        }

        private static readonly Printer OutputPrinter = new Printer(Console.OpenStandardOutput());

        private static readonly Printer ErrorPrinter = new Printer(Console.OpenStandardError());

        private sealed class Printer : StreamWriter
        {
            public Printer(Stream stream)
                : base(stream, new UTF8Encoding(false, true))
            {
                this.AutoFlush = false;
            }

            public Printer(Stream stream, Encoding encoding)
                : base(stream, encoding)
            {
                this.AutoFlush = false;
            }

            public override IFormatProvider FormatProvider => CultureInfo.InvariantCulture;
        }
    }
}


using System;
using System.Linq;
using System.Collections.Generic;
using Debug = System.Diagnostics.Debug;
using StringBuilder = System.Text.StringBuilder;
using System.Numerics;
using Point = System.Numerics.Complex;
using Number = System.Int64;
namespace Program
{
    public class Solver
    {
        public void Solve()
        {
            var q = sc.Integer();
            var par = new int[500002];
            par[0] = -1;
            var dp = Enumerate(500002, x => new double[35]);
            for (int i = 1; i < 35; i++)
                dp[0][i] = 1.0;

            var ptr = 1;
            Action<int> recalc = null;
            recalc = v =>
              {
                  for (int h = 1; h < 35; h++)
                      dp[v][h] = 1.0;
                  var ps = new List<int>();
                  for (int h = 0; h <= 35; h++)
                  {
                      if (v == -1) break;
                      ps.Add(v);
                      v = par[v];
                  }
                  for (int i = ps.Count - 2; i > 0; i--)
                  {
                      var u = ps[i]; var h = i;
                      if (h + 1 >= 35) continue;
                      var p = ps[i + 1];
                      dp[p][h + 1] /= (dp[u][h] + 1) / 2;
                  }
                  for (int i = 0; i + 1 < ps.Count; i++)
                  {
                      var u = ps[i]; var h = i;
                      var p = ps[i + 1];
                      if (h + 1 >= 35) continue;
                      dp[p][h + 1] *= (dp[u][h] + 1) / 2;
                  }
              };
            for (int i = 0; i < q; i++)
            {
                if (sc.Integer() == 1)
                {
                    var p = sc.Integer() - 1;
                    par[ptr] = p;
                    recalc(ptr);
                    ptr++;

                }
                else
                {
                    var v = sc.Integer() - 1;
                    var ans = 0.0;
                    for (int h = 1; h < 35; h++)
                        ans += 1 - dp[v][h];
                    Debug.WriteLine(dp[v].AsJoinedString());
                    IO.Printer.Out.WriteLine(ans);

                }
            }
        }
        public IO.StreamScanner sc = new IO.StreamScanner(Console.OpenStandardInput());
        static T[] Enumerate<T>(int n, Func<int, T> f) { var a = new T[n]; for (int i = 0; i < n; ++i) a[i] = f(i); return a; }
        static public void Swap<T>(ref T a, ref T b) { var tmp = a; a = b; b = tmp; }
    }
}

#region main
static class Ex
{
    static public string AsString(this IEnumerable<char> ie) { return new string(System.Linq.Enumerable.ToArray(ie)); }
    static public string AsJoinedString<T>(this IEnumerable<T> ie, string st = " ") { return string.Join(st, ie); }
    static public void Main()
    {
        var solver = new Program.Solver();
        solver.Solve();
        Program.IO.Printer.Out.Flush();
    }
}
#endregion
#region Ex
namespace Program.IO
{
    using System.IO;
    using System.Text;
    using System.Globalization;
    public class Printer: StreamWriter
    {
        static Printer() { Out = new Printer(Console.OpenStandardOutput()) { AutoFlush = false }; }
        public static Printer Out { get; set; }
        public override IFormatProvider FormatProvider { get { return CultureInfo.InvariantCulture; } }
        public Printer(System.IO.Stream stream) : base(stream, new UTF8Encoding(false, true)) { }
        public Printer(System.IO.Stream stream, Encoding encoding) : base(stream, encoding) { }
        public void Write<T>(string format, T[] source) { base.Write(format, source.OfType<object>().ToArray()); }
        public void WriteLine<T>(string format, T[] source) { base.WriteLine(format, source.OfType<object>().ToArray()); }
    }
    public class StreamScanner
    {
        public StreamScanner(Stream stream) { str = stream; }
        public readonly Stream str;
        private readonly byte[] buf = new byte[1024];
        private int len, ptr;
        public bool isEof = false;
        public bool IsEndOfStream { get { return isEof; } }
        private byte read()
        {
            if (isEof) return 0;
            if (ptr >= len) { ptr = 0; if ((len = str.Read(buf, 0, 1024)) <= 0) { isEof = true; return 0; } }
            return buf[ptr++];
        }
        public char Char() { byte b = 0; do b = read(); while ((b < 33 || 126 < b) && !isEof); return (char)b; }

        public string Scan()
        {
            var sb = new StringBuilder();
            for (var b = Char(); b >= 33 && b <= 126; b = (char)read())
                sb.Append(b);
            return sb.ToString();
        }
        public string ScanLine()
        {
            var sb = new StringBuilder();
            for (var b = Char(); b != '\n'; b = (char)read())
                if (b == 0) break;
                else if (b != '\r') sb.Append(b);
            return sb.ToString();
        }
        public long Long()
        {
            if (isEof) return long.MinValue;
            long ret = 0; byte b = 0; var ng = false;
            do b = read();
            while (b != 0 && b != '-' && (b < '0' || '9' < b));
            if (b == 0) return long.MinValue;
            if (b == '-') { ng = true; b = read(); }
            for (; true; b = read())
            {
                if (b < '0' || '9' < b)
                    return ng ? -ret : ret;
                else ret = ret * 10 + b - '0';
            }
        }
        public int Integer() { return (isEof) ? int.MinValue : (int)Long(); }
        public double Double() { var s = Scan(); return s != "" ? double.Parse(s, CultureInfo.InvariantCulture) : double.NaN; }
        private T[] enumerate<T>(int n, Func<T> f)
        {
            var a = new T[n];
            for (int i = 0; i < n; ++i) a[i] = f();
            return a;
        }

        public char[] Char(int n) { return enumerate(n, Char); }
        public string[] Scan(int n) { return enumerate(n, Scan); }
        public double[] Double(int n) { return enumerate(n, Double); }
        public int[] Integer(int n) { return enumerate(n, Integer); }
        public long[] Long(int n) { return enumerate(n, Long); }
    }
}
#endregion