Polycarp knows that if the sum of the digits of a number is divisible by 3, then the number itself is divisible by 3. He assumes that the numbers, the sum of the digits of which is divisible by 4, are also somewhat interesting. Thus, he considers a positive integer n interesting if its sum of digits is divisible by 4.

A. Nearest Interesting Number


time limit per test: 1 second


memory limit per test: 256 megabytes


input: standard input output: standard output


Polycarp knows that if the sum of the digits of a number is divisible by 3, then the number itself is divisible by 3. He assumes that the numbers, the sum of the digits of which is divisible by 4, are also somewhat interesting. Thus, he considers a positive integer n interesting if its sum of digits is divisible by 4.


Help Polycarp find the nearest larger or equal interesting number for the given number a. That is, find the interesting number n such that


na and n is minimal.


Input


The only line in the input contains an integer a (1 < a < 1000).


Output


Print the nearest greater or equal interesting number for the given number a. In other words, print the interesting number n such that na and n is minimal.


Examples


input


432


Copy


output


435


input


99


output


103








 a=int(input("Enter a number:"))


sum=0

temp=a

while(temp>0):

    rem=temp%10

    sum=sum+rem

    temp=temp//10

   

print("Sum of digits of the number is:",sum)

if (sum%3==0):

        for j in range(1,5):

            a=a+1

            T=a

            S=0

            while(T>0):

           

                rem=T%10

                S+=rem

                T=T//10

            if (S%4==0):

                print("Next nearest number is :",a)    

            else:

                S=0

else:

                pass

No comments:

Powered by Blogger.