use std::io::Read;
use std::str::SplitWhitespace;
use std::str::FromStr;

pub fn read_stdin() -> String {
    let mut s = String::new();
    ::std::io::stdin().read_to_string(&mut s).unwrap();
    s
}

pub trait Parse<T> {
    fn parse(&mut self) -> T;
}

impl<'a, T> Parse<T> for SplitWhitespace<'a>
where
    T: FromStr,
{
    fn parse(&mut self) -> T {
        let word = self.next().unwrap();
        word.parse().ok().unwrap()
    }
}

fn main() {
    let source = read_stdin();
    let mut iter = source.split_whitespace();
    let s = iter.next().unwrap().chars().collect::<Vec<_>>();

    let mut dic: std::collections::HashSet<String> = std::collections::HashSet::new();
    let mut v = Vec::new();

    let mut ss = String::new();
    for c in s {
        ss += &c.to_string();
        if !dic.contains(&ss) {
            dic.insert(ss.clone());
            v.push(ss.clone());
            ss.clear();
        }
    }

    while !ss.is_empty() {
        if let Some(last) = v.pop() {
            dic.remove(&last);
            ss = last + &ss;
            if !dic.contains(&ss) {
                dic.insert(ss);
                break;
            }
        }
    }

    println!("{}", dic.len());
}