• + 43 comments

    watch out for integer overflow :). i had to switch to 64-bit int.