space to refresh and to start c to clear all integers -- this is to remove the lag. The program will take longer, but it will help keep it from crashing. Please do not input some crazy big number unless you want to crash.
I improved it by refresh with space