CHEFADD - Point out the tortoise

I cannot seem to find which part of this code is causing it to drastically slow down for large inputs. Is there any scope of improvement ?

https://ptpb.pw/vsTP/C++