#include <bits/stdc++.h>

using namespace std;

std::vector<int> getVisionPattern1d()
{
    return {3, 2, 1, 1};
}

int getMove1d(std::vector<int> v)
{
    int dis = v.size() / 2;
    assert(v.size() == 2 * dis + 1);
    if(dis == 3)
    {
        if(v[dis + 1] == 2)
            return dis + dis;
        return 0;
    }
    if(v[dis - 1] > dis)
        return dis - 1;
    assert(v[dis + 1] > dis);
    return dis + 1;
}