import qualified Data.ByteString.Char8 as C
import qualified Data.IntSet as S
import Data.List

main = C.interact $ put . sol . get

get = unfoldr (C.readInt . C.dropWhile (==' ')) . last . C.lines

put = C.pack . show

sol = (\x -> (x-1)`div`2*2+1) . S.size . S.fromList
