added main and most simple algorithm (185309 actions)