Descartes´ purpose in writing Discourse on Method was to find a clear and distinct form of knowledge devoid of any kind of uncertainty brought about by the senses or by confused and obscure ideas.
The way he famously approached this issue was to conceive of a single thought that would be indubitable, reaching the idea behind the Cartesian cogito, that is: “I think, therefore I am”. This is indeed the case because one can certainly doubt anything other than the fact the one is doubting everything, and that thought alone proves that I am something that thinks, and as such, as something that thinks, I must exist.