You could use ``int()`` instead of doing custom formatting.