Zaslat SMS: Dynamic programming and optimal control