how to fix integer overflow - Search