Simpler formula.
Prefer utoipos over stoi.
Use lpfu for its intended purpose.