#include <bits/stdc++.h>
using namespace std;

int main() {
    int n;
    cin >> n;
    
    int a[n];
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }

    int x = 1, y = n / 3 + 1, z = n * 2 / 3 + 1;
    int maxn = max(x, max(y, z)), minn = min(x, min(y, z));
    cout << maxn - minn << '\n';
    cout << x << ' ' << y << ' ' << z;
}
