#include <stdio.h>

main()
{
        char    line[80],
                *cp1;
        int     hash=0;

        while(!feof(stdin))
        {
                printf("Keyword : ");
                if (!gets(line))
                {
                        printf("\n");
                        exit(0);
                }

                cp1 = line;
                hash = 0;
                while(*cp1)
                {
                        hash += *cp1++;
                }
                hash = hash & (16 - 1);
                printf("Hash = %d\n\n",hash);
        }
}


