A marble game is played on a board, each cell of which may contain a number of marbles. Your task is to collect as many marbles as possible using a robot on the board.
The layout of the board is given in the String board, where each cell is marked with a digit ('0'-'9'), '#', 'U' or 'L'.
Each digit represents the number of marbles in that cell. There are no marbles in cells that are not marked with digits.
The robot starts in the upper left cell, which is the first character of the first element of board. During each turn, it can move according to the following rules:
- The robot can't move out of the board.
- The robot can't enter a cell marked '#'.
- The robot may move either right or down one step from any cell.
- The robot may move up one step from a cell marked 'U'.
- The robot may move left one step from a cell marked 'L'.
When the robot enters a cell for the first time, it collects all the marbles from that cell. That cell will no longer contain any marbles for the rest of the game. Return the maximum total number of marbles the robot can collect.