input distribution corresponds to the total size