#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long MAX = 1e14 + 8;
const long long MAXN = 1e5 + 8;
vector<long long> u, d;
long long a[3333333];
int main() {
  long long n;
  cin >> n;
  long long x;
  cin >> x;
  a[0] = x;
  u.push_back(0);
  d.push_back(0);
  for (int i = 1; i < n; i++) {
    scanf("%I64d", &x);
    ;
    a[i] = x;
    if (u.size() == 1) {
      if (x > a[u[0]]) u.push_back(i);
      if (x < a[u[0]]) u[0] = i;
    }
    if (u.size() == 2) {
      if (x < a[u[1]]) u.push_back(i);
      if (x > a[u[1]]) u[1] = i;
    }
    if (d.size() == 1) {
      if (x < a[d[0]]) d.push_back(i);
      if (x > a[d[0]]) d[0] = i;
    }
    if (d.size() == 2) {
      if (x > a[d[1]]) d.push_back(i);
      if (x < a[d[1]]) d[1] = i;
    }
  }
  if (u.size() == 3) {
    cout << 3 << endl << u[0] + 1 << " " << u[1] + 1 << " " << u[2] + 1;
    return 0;
  }
  if (d.size() == 3) {
    cout << 3 << endl << 1 + d[0] << " " << 1 + d[1] << " " << 1 + d[2];
    return 0;
  }
  cout << 0;
  return 0;
}
