#include <bits/stdc++.h>
using namespace std;
int n;
const int N = 1e5 + 5;
int a[N];
vector<int> les, up;
bool tLes[N], tUp[N];
bool check(int aa, int bb, int cc) {
  if (a[bb] > a[aa] && a[bb] > a[cc]) return 1;
  if (a[bb] < a[aa] && a[bb] < a[cc]) return 1;
  return 0;
}
int main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  if (n <= 2) {
    cout << "0\n";
    return 0;
  }
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<int> ve;
  ve.push_back(0);
  for (int i = 1; i < n; i++) {
    if (a[ve.back()] != a[i]) {
      ve.push_back(i);
    }
  }
  if (ve.size() <= 2) {
    cout << "0\n";
    return 0;
  }
  up.push_back(a[ve.front()]);
  tUp[0] = 1;
  for (int i = 1; i < ve.size(); i++) {
    if (up.back() <= a[ve[i]]) {
      tUp[ve[i]] = 1;
      up.push_back(a[ve[i]]);
    } else {
      up.push_back(a[ve[i]]);
    }
  }
  vector<int> ans;
  for (int i = 0; i < (int)ve.size() - 3 + 1; i++) {
    if (tUp[ve[i]] && tUp[ve[i + 1]] && !tUp[ve[i + 2]] &&
        check(ve[i], ve[i + 1], ve[i + 2])) {
      ans.push_back(ve[i]);
      ans.push_back(ve[i + 1]);
      ans.push_back(ve[i + 2]);
      break;
    } else if (tUp[ve[i]] && !tUp[ve[i + 1]] && tUp[ve[i + 2]] &&
               check(ve[i], ve[i + 1], ve[i + 2])) {
      ans.push_back(ve[i]);
      ans.push_back(ve[i + 1]);
      ans.push_back(ve[i + 2]);
      break;
    } else if (!tUp[ve[i]] && !tUp[ve[i + 1]] && tUp[ve[i + 2]] &&
               check(ve[i], ve[i + 1], ve[i + 2])) {
      ans.push_back(ve[i]);
      ans.push_back(ve[i + 1]);
      ans.push_back(ve[i + 2]);
      break;
    }
  }
  if (ans.size() == 3) {
    cout << "3\n";
    for (auto i : ans) {
      cout << i + 1 << " ";
    }
    return 0;
  }
  cout << "0\n";
}
