const inp = require('fs').readFileSync('/dev/stdin', 'utf8').trim().split('\n') 
const c = 'a'.charCodeAt(0)
const alphabets = Array.apply(null, new Array(26)).map((v, i) => {
  return String.fromCharCode(c + i)
})
let red = 0
alphabets.forEach(alphabet => {
  if (alphabet === inp) {
    return true
  } else {
    red += 1 
  }
})

console.log(red)