HELP!!! ๐Ÿ˜

Rachael
Ok so my boyfriend and I had unprotected sex last night but he only went in three times and it was just to tease me so it was just in and then out. 
He didn't cum in me at all but I know that Precum is a thing and you can get pregnant from Precum. I'm 17 and I really can't afford a pregnancy in my life rn. (Now people are gunna say if you don't want to get pregnant don't have sex, I know guys, you don't have to tell me)
I'm not on any form of birth control and So I'm thinking about taking the pill just to stay safe. My period just ended and I'm just really nervous. 
What do you guys suggest? Is the pill a good idea???