package main

import (
  "bufio"
  "os"
  "strconv"
  "strings"
  "fmt"
)

var reader = bufio.NewReaderSize(os.Stdin, 1000000)
var writer = bufio.NewWriter(os.Stdout)
func NextLine() string {
  buffer := make([]byte, 0)
  for true {
    line, isPrefix, err := reader.ReadLine()
    if err != nil { panic(err) }
    buffer = append(buffer, line...)
    if !isPrefix { break }
  }
  return string(buffer)
}
func NextInt() int {
  n, _ := strconv.Atoi(NextLine())
  return n
}
func NextIntVec() []int {
  L := strings.Split(NextLine(), " ")
  N := make([]int, len(L))
  for i := range N {
    N[i], _ = strconv.Atoi(L[i])
  }
  return N
}
func Write(s interface{}) {
  fmt.Fprintln(writer, s)
}
func Output() {
  _ = writer.Flush()
}

func MaxInt(A ...int) int {
  max := A[0]
  for _, a := range A {
    if max < a { max = a }
  }
  return max
}
func MinInt(A ...int) int {
  min := A[0]
  for _, a := range A {
    if a < min { min = a }
  }
  return min
}

func Solve() {
  S := NextLine()
  N := len(S)
  W := make([][]int, 26)
  for i := range W {
    W[i] = make([]int, N)
  }
  for i, s := range S {
    W[int(s - rune('a'))][i]++
  }
  for i := range W {
    for j := range W[i][1:] {
      W[i][j + 1] += W[i][j]
      W[i][j + 1] %= 2
    }
  }
  P := make([]int, N)
  for i := range P {
    for j := range W {
      P[i] += W[j][i] * 1 << uint(j)
    }
  }
  H := make([]int, 1 << uint(26))
  for i := range H[1:] {
    H[i + 1] = N
  }
  for _, p := range P {
    for i := 0; i < 26; i++ {
      q := 1 << uint(i)
      H[p] = MinInt(H[p ^ q] + 1, H[p])
    }
  }
  H[0]++
  Write(H[P[N - 1]])
  return
}

func main() {
  Solve()
  Output()
}