using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace D_After
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            int[] a = new int[input.Length + 1];
            for (int i = 0; i < a.Length; i++)
            {
                int ret = 0;
                foreach (var v in input.Substring(0, i))
                    ret ^= (1 << (v - 'a'));
                a[i] = ret;
            }

            int[] opt = new int[input.Length + 1];

            Dictionary<int, int> dp = new Dictionary<int, int>();

            opt[0] = 0;

            List<int> X = new List<int>();
            for (int i = -1; i < 26; i++)
            {
                if (i < 0)
                    X.Add(0);
                else
                    X.Add(1 << i);
            }


            Dictionary<int, List<int>> T = new Dictionary<int, List<int>>();

            for (int i = 1; i <= input.Length; i++)
            {
                
                // O(n^2) method
                /*
                List<int> s = new List<int>();
                for (int j = 0; j < i; j++)
                {
                    if ((a[i] ^ a[j]) == 0 ? true : ((a[i] ^ a[j]) & ((a[i] ^ a[j]) - 1)) == 0)
                    {
                        s.Add(j);
                    }
                }
                opt[i] = s.Select(x => opt[x]).Min() + 1;
                */

                // O(n) method

                int x = a[i - 1];
                if (!T.ContainsKey(x))
                {
                    T.Add(x, new List<int>());
                }
                T[x].Add(i - 1);

                foreach (var v in T.Keys)
                {
                    if (!dp.ContainsKey(v))
                        dp.Add(v, int.MaxValue);
                    dp[v] = T[v].Select(y => opt[y]).Union(new int[] { dp[v] }).Min();
                }

                opt[i] = X.Select(y => dp.ContainsKey(a[i] ^ y) ? dp[a[i] ^ y] : int.MaxValue).Min() + 1;
            }

            Console.WriteLine(opt[opt.Length - 1]);
# if DEBUG
            Console.ReadKey();
#endif
        }
    }
}
