Parse strings to integers