Adam, obviously.
Now, was Adam created immaculately or not?
Since sin enetered the world through Adam, God did not need Joseph physically in His plan for the redemption of man.
Sin did not enter the world through Eve, as sin is passed on through the loins of men, not women, thus there was no need for Mary the mother of Jesus to be immaculately conceived.