Quick solution due to Python's handling of large numbers