Normal sudoku rules apply. Draw a "simple loop" in the grid ie a single closed loop that visits all cells except the ones containing a 5. The loop must go horizontally or vertically from cell to cell without branching or intersecting itself. Grey-cell clues outside the grid give the sum of the all the cells between the border and the 5 in that row/column containing straight line segments. White-cell clues outside the grid give the sum of all cells between the border and the 5 in that row/column containing corner segments.