Preheat your oven to 400°F (200°C). Prick the potatoes all over with a fork, then place them on a baking sheet and roast them in the preheated oven for 45-60 minutes, until they are tender when pierced with a knife.
Remove the potatoes from the oven and let them cool until you can handle them comfortably. Then, peel the potatoes and mash them with a potato masher in a large bowl.
Add the flour, egg, and a pinch of salt to the bowl with the riced potatoes. Mix everything together with your hands until a soft dough forms.
Dust a work surface with a little bit of flour. Divide the dough into 4 equal pieces. Working with one piece of dough at a time, roll it into a long, thin rope about ¾-inch (2 cm) in diameter. Cut the rope into ½-inch (1.5 cm) pieces to form the gnocchi.
Bring a large pot of salted water to a boil. Drop the gnocchi into the boiling water, a few at a time, and cook them until they rise to the surface, which should take 1-2 minutes.
Using a slotted spoon, transfer the gnocchi to a plate and toss them with a little bit of olive oil to prevent them from sticking together. Repeat with the remaining dough.
Serve the gnocchi hot with your choice of sauce. Enjoy!