Program working for single numbers, necessary to add accounting for if
rule 3 and 4 are used together and support for input file.