semyon participate prestigious competition world ocean title dangerous shark during competition shark compete different subject speed swimming masking map navigation now Semyon take destruction contestduring m domino place shark all domino line height domino vary the distance adjacent dominoe 1 moreover Domino cost value express integer the goal drop domino to shark push domino leave right begin fall direction if fall domino touch domino start fall direction original domino fall begin chain reaction result domino fall a fall domino touch distance strictly height fall domino domino necessarily adjacentof course shark easily drop domino way goal drop dominoe minimum cost the cost destruction sum cost dominoes shark need push dominoes fallSimon win previous subject smart win Help Semyon determine minimum total cost domino push domino fall