Parse string to integer