parseInt(x) = parse(Int, x) parseMap(x::Array{SubString{String},1}) = map(parseInt, x) function main() x,y,z = readline() |> split |> parseMap println(min((x+y+z)>>1,min(x+y)+z)) main()