Order of operations Big Integer solver in Java