const Main = (input) => {
  const Sarr = input.trim().split('')

  const Sdistinct = []

  for (var i = 0; i < Sarr.length; i++) {
    if (Sdistinct.indexOf(Sarr[i]) === -1) {
      Sdistinct.push(Sarr[i])
    }
  }

  const StrL = Sdistinct.sort().length

  const SarrL = Sarr.length

  var result = Math.abs(SarrL - StrL)

  console.log(result)
  return result
}

Main(require('fs').readFileSync('/dev/stdin', 'utf8'))