It works fine when I enter a positive number, but then there is an unwanted incrementation when the input is negative. How to satisfy the last condition? I even used the letters 'a' & 'b' as depicted in the question. Thanks in advance!