Convert atom to integer