Update index.js to fix #1.

Updating the overall percentage to be an integer instead of a float by using, fixing #1.