sh-4.2$ python -c "print(-805387388120759743+804357581458175153+126021232973356313)" 42
bc/dc arbitrary precision calculators are usually installed by default on *nix platforms and they handle numbers with thousands of digits
$ time echo '12345^67890' |bc |wc -c
285941
real 0m2.137s
user 0m2.128s
sys 0m0.012s
sh-4.2$ python -c "print(-805387388120759743+804357581458175153+126021232973356313)" 42