As mentioned above, the result should and always will be 22, so, strangely, your output would be 17. My biggest thought is that you might be running the incorrect Python file with a formula that would result in 17. So just double-check that you are running the correct file.
Also, just as a...