Zynga Interview Question

Write program that takes string and returns a digit.