Who's the father?

Me and my boyfriend broke up back in May. On May 14, I had unprotected sex with a friend, he did not cum in me. I had my period May 29th - June 1st. A day or two after my period had stopped I had unprotected sex with my boyfriend, he did cum in me. I am now 22 weeks & 5 days pregnant. Who is the baby's father? Please explain.