Envoyer par SMS: The mathematics of foam