import strutils
import sequtils
import algorithm
import math
import queues
import tables
import sets
import logging
import future

const INF* = int(1e18 + 373)

proc readSeq*(): seq[string] = stdin.readLine().strip().split()
proc readSeq*(n: Natural): seq[string] =
  result = newSeq[string](n)
  for i in 0..<n:
    result[i] = stdin.readLine().strip()

proc readInt1*(): int = readSeq().map(parseInt)[0]
proc readInt2*(): (int, int) =
  let a = readSeq().map(parseInt)
  return (a[0], a[1])
proc readInt3*(): (int, int, int) =
  let a = readSeq().map(parseInt)
  return (a[0], a[1], a[2])
proc readInt4*(): (int, int, int, int) =
  let a = readSeq().map(parseInt)
  return (a[0], a[1], a[2], a[3])

type seq2*[T] = seq[seq[T]]
proc newSeq2*[T](n1, n2: Natural): seq2[T] = newSeqWith(n1, newSeq[T](n2))

#------------------------------------------------------------------------------#
proc access(firstIndexOf: Table[int, int]; i: int): int =
  if i in firstIndexOf: firstIndexOf[i] else: INF

proc main() =
  let s = stdin.readLine().map(it => it.ord() - 'a'.ord())
  let n = s.len()

  var cum = newSeq[int](n + 1)
  for i in 0..<n:
    cum[i + 1] = cum[i] xor (1 shl s[i])

  let alphabet = 'z'.ord() - 'a'.ord() + 1
  var firstIndexOf = initTable[int, int]()
  for i in 0..n:
    if cum[i] notin firstIndexOf:
      firstIndexOf[cum[i]] = INF
    firstIndexOf[cum[i]] = min(firstIndexOf[cum[i]], i)

  var dp = newSeq[int](n + 1)
  dp[0] = 0
  for i in 1..n:
    var opt = dp[i - 1] + 1

    let j = firstIndexOf.access(cum[i])
    if j != INF and j < i:
      opt = min(opt, dp[j] + 1)

    for c in 0..<alphabet:
      let j = firstIndexOf.access(cum[i] xor (1 shl c))
      if j != INF and j < i:
        opt = min(opt, dp[j] + 1)
    dp[i] = opt

  echo dp[n]

main()

