correct <- function(n,ps,pf) (1-pf)*n/(2-ps-pf)