#include <bits/stdc++.h>
using namespace std;
const int maxn = 100010;
int num[maxn];
int maxx1[maxn], minn1[maxn], maxx2[maxn], minn2[maxn];
int pmaxx1[maxn], pminn1[maxn], pmaxx2[maxn], pminn2[maxn];
int n;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &num[i]);
  minn1[0] = maxx1[0] = num[0];
  pminn1[0] = pmaxx1[0] = 0;
  for (int i = 1; i < n; i++) {
    if (minn1[i - 1] > num[i]) {
      minn1[i] = num[i];
      pminn1[i] = i;
    } else {
      minn1[i] = minn1[i - 1];
      pminn1[i] = pminn1[i - 1];
    }
    if (maxx1[i - 1] < num[i]) {
      maxx1[i] = num[i];
      pmaxx1[i] = i;
    } else {
      maxx1[i] = maxx1[i - 1];
      pmaxx1[i] = pmaxx1[i - 1];
    }
  }
  minn2[n - 1] = maxx2[n - 1] = num[n - 1];
  pminn2[n - 1] = pmaxx2[n - 1] = n - 1;
  for (int i = n - 2; i >= 0; i--) {
    if (minn2[i + 1] > num[i]) {
      minn2[i] = num[i];
      pminn2[i] = i;
    } else {
      minn2[i] = minn2[i + 1];
      pminn2[i] = pminn2[i + 1];
    }
    if (maxx2[i + 1] < num[i]) {
      maxx2[i] = num[i];
      pmaxx2[i] = i;
    } else {
      maxx2[i] = maxx2[i + 1];
      pmaxx2[i] = pmaxx2[i + 1];
    }
  }
  for (int i = 1; i < n - 1; i++) {
    if (maxx1[i - 1] > num[i] && num[i] < maxx2[i + 1]) {
      puts("3");
      printf("%d %d %d\n", pmaxx1[i - 1] + 1, i + 1, pmaxx2[i + 1] + 1);
      return 0;
    }
    if (minn1[i - 1] < num[i] && num[i] > minn2[i + 1]) {
      puts("3");
      printf("%d %d %d\n", pminn1[i - 1] + 1, i + 1, pminn2[i + 1] + 1);
      return 0;
    }
  }
  puts("0");
  return 0;
}
