import scala.io.StdIn._

object Main {
    def main(args: Array[String]){
        val s = readLine
        var set = Set[String]()
        for (i <- 0 to s.length; j <- i to s.length) {
            val _f = s.slice(0, i)
            val _s = s.slice(i, j).reverse
            val _l = s.slice(j, s.length)
            set += _f + _s + _l
        }
        printf("%s\n", set.size)
    }
}