#include <bits/stdc++.h>
using namespace std;
const int N = 2000228;
int a[N], b[N], dp[N], l[N], r[N];
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  multiset<pair<int, int> > ml, mr;
  for (int i = 0; i < n; i++) {
    mr.insert(make_pair(a[i], i));
  }
  for (int i = 0; i < n; i++) {
    mr.erase(mr.find(make_pair(a[i], i)));
    bool was = 0;
    multiset<pair<int, int> >::iterator itl =
        ml.lower_bound(make_pair(a[i], -1));
    if (ml.size() == 0 || itl == ml.begin()) {
      was = 1;
    } else {
      itl--;
    }
    multiset<pair<int, int> >::iterator itr =
        mr.lower_bound(make_pair(a[i], -1));
    if (mr.size() == 0 || itr == mr.begin()) {
      was = 1;
    } else {
      itr--;
    }
    if (!was) {
      cout << "3\n"
           << itl->second + 1 << " " << i + 1 << " " << itr->second + 1 << "\n";
      return 0;
    }
    was = 0;
    itl = ml.lower_bound(make_pair(a[i], n + 1));
    if (itl == ml.end()) {
      was = 1;
    }
    itr = mr.lower_bound(make_pair(a[i], n + 1));
    if (itr == mr.end()) {
      was = 1;
    }
    if (!was) {
      cout << "3\n"
           << itl->second + 1 << " " << i + 1 << " " << itr->second + 1 << "\n";
      return 0;
    }
    ml.insert(make_pair(a[i], i));
  }
  cout << "0\n";
  return 0;
}
