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

namespace atcoder
{
	class Program
	{
		static int In => int.Parse(Console.ReadLine());
		static int[] Ins => Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
		static void Out(bool b) => Console.WriteLine(b ? "Yes" : "No");

		static void Main(string[] args)
		{
			
			var str = Console.ReadLine();
			int ans = aa(str);
			if (ans == 1)
			{
				Console.WriteLine(ans);
				return;
			}
			int tmp = str.Length;
			for (int i = 1;i < str.Length;i++)
			{
				string s1 = str.Substring(0, i);
				string s2 = str.Substring(i, str.Length - i);
				tmp = Math.Min(tmp, aa(s1) + aa(s2));
			}
			Console.WriteLine(Math.Max(ans,tmp));
			//Console.ReadLine();
		}

		static int aa(String str)
		{
			if (str == string.Empty) return 0;
			Dictionary<char, int> count = new Dictionary<char, int>();
			for (int i = 0; i < str.Length; i++)
			{
				if (count.ContainsKey(str[i])) count[str[i]]++;
				else count.Add(str[i], 1);
			}
			int ans = 0;
			foreach (var a in count)
			{
				if (a.Value % 2 == 1) ans++;
			}
			if (ans == 0) ans++;
			return ans;
		}
	}
}