Peter and andy had 4000 chicken altogether.After selling some of them them . Peter had 856 chicken left and Andy had 587 chicken left . How many chicken did they sell altogether?