require'prime' s=gets.chop.chars n=s.size-1 p (0...1<>j&1>0??+:'')}.join).prime?}