#include <bits/stdc++.h>
using namespace std;
int dx[4] = {-1, 1, 0, 0};
int dy[4] = {0, 0, -1, 1};
bool isone(long long, int);
int count(long long);
long long exp(long long, long long, long long);
long long GCD(long long, long long);
int BIT[5][2000010];
int s[2][100010];
int a[100010];
void upd(int idx, int i, int val) {
  for (; i < 2000010; i += (i & (-i))) BIT[idx][i] += val;
  return;
}
int f(int idx, int i) {
  int ret = 0;
  for (; i > 0; i -= (i & (-i))) ret += BIT[idx][i];
  return ret;
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    a[i] += 1000001;
  }
  int i = 0;
  int ff = 0;
  for (i = 0; i < n; i++) {
    if (f(2, a[i] - 1)) {
      ff = 1;
      break;
    } else if ((f(1, 2000010 - 2) - f(1, a[i]))) {
      ff = 2;
      break;
    }
    upd(0, a[i], 1);
    s[0][i] = f(0, a[i] - 1);
    s[1][i] = f(0, 2000010 - 2) - f(0, a[i]);
    upd(1, a[i], s[0][i]);
    upd(2, a[i], s[1][i]);
  }
  if (i == n)
    cout << 0 << endl;
  else {
    if (ff == 1) {
      int t1 = i, t2 = -1, t3 = -1;
      for (i = i - 1; i >= 0; i--) {
        if (a[i] < a[t1] && s[1][i]) {
          t2 = i;
          break;
        }
      }
      for (i--; i >= 0; i--)
        if (a[i] > a[t2]) {
          t3 = i;
          break;
        }
      cout << 3 << endl << 1 + t3 << " " << 1 + t2 << " " << 1 + t1 << endl;
    } else {
      int t1 = i, t2 = -1, t3 = -1;
      for (i--; i >= 0; i--) {
        if (a[i] > a[t1] && s[0][i]) {
          t2 = i;
          break;
        }
      }
      for (i--; i >= 0; i--) {
        if (a[i] < a[t2]) {
          t3 = i;
          break;
        }
      }
      cout << 3 << endl << 1 + t3 << " " << 1 + t2 << " " << 1 + t1 << endl;
    }
  }
  return 0;
}
long long GCD(long long a, long long b) {
  if (!b)
    return a;
  else
    return GCD(b, a % b);
}
long long exp(long long a, long long b, long long c) {
  long long ret = 1LL;
  long long mult = a;
  while (b) {
    if (b & 1) ret = (ret * mult) % c;
    mult = (mult * mult) % c;
    b >>= 1;
  }
  return ret;
}
int count(long long x) {
  int ret = 0;
  while (x) {
    if (x & 1) ret++;
    x >>= 1LL;
  }
  return ret;
}
bool isone(long long x, int pos) { return x & (1 << pos); }
