#include<string>
#include<iostream>
unsigned long long hash( std::string str )
{
    unsigned long long _hash = 5381;
    for( unsigned char znak: str )
         _hash =(( _hash << 5 ) + _hash ) + znak; /* hash * 33 + c */
   
    return _hash;
}

int main()
{
    std::string s = "witam";
    std::cout << hash( s );
}