#include <bits/stdc++.h>
using namespace std;
const long double PI = 3.141592653589793238462643383279502884L;
const long double E = 2.718281828459045235360287471352662498L;
const long double EPS = 1e-12L;
int n, mn, mx;
int a[100000];
int bl[100000];
int cl[100000];
int br[100000];
int cr[100000];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.precision(11);
  cout.setf(ios::fixed);
  cin >> n;
  fill(bl, bl + n, -1);
  fill(cl, cl + n, -1);
  fill(br, br + n, -1);
  fill(cr, cr + n, -1);
  mn = 0;
  mx = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[mn] < a[i]) {
      bl[i] = mn;
    } else if (a[mn] > a[i]) {
      mn = i;
    }
    if (a[mx] > a[i]) {
      cl[i] = mx;
    } else if (a[mx] < a[i]) {
      mx = i;
    }
  }
  mn = mx = n - 1;
  for (int i = n - 1; i >= 0; --i) {
    if (a[mn] < a[i]) {
      br[i] = mn;
    } else if (a[mn] > a[i]) {
      mn = i;
    }
    if (a[mx] > a[i]) {
      cr[i] = mx;
    } else if (a[mx] < a[i]) {
      mx = i;
    }
  }
  for (int i = 0; i < n; i++) {
    if (bl[i] != -1 && br[i] != -1) {
      cout << 3 << '\n';
      cout << bl[i] + 1 << ' ' << i + 1 << ' ' << br[i] + 1 << '\n';
      return 0;
    }
    if (cl[i] != -1 && cr[i] != -1) {
      cout << 3 << '\n';
      cout << cl[i] + 1 << ' ' << i + 1 << ' ' << cr[i] + 1 << '\n';
      return 0;
    }
  }
  cout << 0 << '\n';
  return 0;
}
