#include <bits/stdc++.h>
using namespace std;
int n, m;
int k;
struct wgh {
  int x, v;
} b[1000001], ans1, ans2, a[100001];
bool cmp(wgh a, wgh b) {
  if (a.v != b.v)
    return a.v < b.v;
  else
    return a.x > b.x;
}
int main() {
  int i, j, k;
  while (scanf("%d", &n) != EOF) {
    for (i = 1; i <= n; i++) {
      scanf("%d", &a[i].v);
      a[i].x = i;
      b[i] = a[i];
    }
    sort(b + 1, b + 1 + n, cmp);
    int r = 1;
    ans2 = a[n];
    for (i = n - 1; i >= 1; i--) {
      while (b[r].x >= i) {
        r++;
        if (r > n) {
          break;
        }
      }
      if (r > n) {
        break;
      }
      if (b[r].v < a[i].v && a[i].v > ans2.v) {
        break;
      }
      if (ans2.v > a[i].v) {
        ans2 = a[i];
      }
    }
    if (n < 3) {
      printf("0\n");
      continue;
    }
    if (r > n) {
      int r = n;
      ans2 = a[n];
      for (i = n - 1; i >= 1; i--) {
        while (b[r].x >= i) {
          r--;
          if (r < 1) {
            break;
          }
        }
        if (r < 1) {
          break;
        }
        if (b[r].v > a[i].v && a[i].v < ans2.v) {
          break;
        }
        if (ans2.v < a[i].v) {
          ans2 = a[i];
        }
      }
      if (r < 1) {
        printf("0\n");
      } else {
        printf("3\n");
        printf("%d %d %d\n", b[r].x, a[i].x, ans2.x);
      }
      continue;
    } else {
      printf("3\n");
      printf("%d %d %d\n", b[r].x, a[i].x, ans2.x);
    }
  }
  return 0;
}
