using GMP lib to deal with overflow on 32bit machines
switching to bcmath
python answer