Good for now. I don't think I need dynamic programming for this.