#include <bits/stdc++.h>
using namespace std;
template <typename T>
void read(T &x) {
  x = 0;
  char c = getchar();
  int sgn = 1;
  while (c < '0' || c > '9') {
    if (c == '-') sgn = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
  x *= sgn;
}
template <typename T>
void out(T x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x >= 10) out(x / 10);
  putchar(x % 10 + '0');
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
const int N = 1e5 + 5;
int a[N];
int d[N];
std::vector<int> v;
map<int, int> mp;
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    read(a[i]);
  }
  d[1] = a[1];
  int len = 1;
  for (int i = 2; i <= n; i++) {
    if (a[i] >= d[len])
      d[++len] = a[i];
    else {
      int j = upper_bound(d + 1, d + len + 1, a[i]) - d;
      d[j] = a[i];
    }
  }
  if (len == 1 || len == n) {
    cout << 0 << endl;
    return 0;
  }
  int x = 0, y = 0, z = 0;
  int p = 0;
  int k = 0;
  int flag = 0;
  for (int i = 1; i <= n + 1; i++) {
    if (a[i] < a[i + 1]) {
      x = i;
      p = i + 1;
      k = 1;
      break;
    }
  }
  if (k) {
    for (int i = p; i <= n - 1; i++) {
      if (a[i] > a[i + 1]) {
        y = i;
        z = i + 1;
        flag = 1;
        break;
      }
    }
  }
  if (flag == 0) {
    k = 0;
    x = 0, y = 0, z = 0;
    p = 0;
    for (int i = 1; i <= n - 1; i++) {
      if (a[i] > a[i + 1]) {
        x = i;
        p = i + 1;
        k = 1;
        break;
      }
    }
    if (k)
      for (int i = p; i <= n - 1; i++) {
        if (a[i] < a[i + 1]) {
          y = i;
          z = i + 1;
          flag = 1;
          break;
        }
      }
  }
  if (flag) {
    cout << 3 << endl;
    cout << x << ' ' << y << ' ' << z << endl;
  } else
    cout << 0 << endl;
  return 0;
}
