#include <bits/stdc++.h>
using namespace std;
const int inf = (1 << 30) - 1;
const long double eps = 1e-9;
const long double pi = fabs(atan2(0.0, -1.0));
void ML() {
  int *ass;
  for (;;) {
    ass = new int[2500000];
    for (int i = 0; i < 2500000; i++) ass[i] = rand();
  }
}
int n;
int a[100500];
int id[100500];
bool cmpmin(const int q, const int w) { return a[q] < a[w]; }
void LoAd() {
  cin >> n;
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  a[n + 1] = INT_MAX;
  a[0] = INT_MIN;
}
void fnd() {
  int lt = 1;
  int rt = n;
  int i = 0;
  while (rt - lt >= 2) {
    if (a[rt - 1] == a[rt]) {
      rt--;
      continue;
    }
    if (a[lt + 1] == a[lt]) {
      lt++;
      continue;
    }
    int mid = id[i];
    if (mid < lt || mid > rt) {
      i++;
      continue;
    }
    if (mid == lt) {
      lt++;
      i++;
      continue;
    }
    if (mid == rt) {
      rt--;
      i++;
      continue;
    }
    int lm = -1;
    int rm = -1;
    for (int j = lt; j < mid; j++) {
      if (a[j] > a[mid]) {
        lm = j;
        break;
      }
    }
    for (int j = rt; j > mid; j--) {
      if (a[j] > a[mid]) {
        rm = j;
        break;
      }
    }
    assert(-1 != lm && -1 != rm);
    {
      puts("3");
      printf("%d %d %d", lm, mid, rm);
      exit(0);
    }
  }
}
void SoLvE() {
  for (int i = 0; i < n; i++) id[i] = i + 1;
  sort(id, id + n, cmpmin);
  fnd();
  for (int i = 1; i <= n; i++) a[i] *= (-1);
  reverse(id, id + n);
  fnd();
  puts("0");
}
int main() {
  srand((int)time(NULL));
  LoAd();
  SoLvE();
  return 0;
}
