#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(n + 1);
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  vector<pair<int, int>> mi_pref(n + 1);
  vector<pair<int, int>> mx_pref(n + 1);
  mi_pref[0].first = 1 << 30;
  mx_pref[0].first = -(1 << 30);
  for (int i = 1; i <= n; i++) {
    if (mi_pref[i - 1].first > a[i]) {
      mi_pref[i].first = a[i];
      mi_pref[i].second = i;
    } else {
      mi_pref[i] = mi_pref[i - 1];
    }
    if (mx_pref[i - 1].first < a[i]) {
      mx_pref[i].first = a[i];
      mx_pref[i].second = i;
    } else {
      mx_pref[i] = mx_pref[i - 1];
    }
  }
  vector<pair<int, int>> mi_suff(n + 2);
  vector<pair<int, int>> mx_suff(n + 2);
  mi_suff[n + 1].first = 1 << 30;
  mx_suff[n + 1].first = -(1 << 30);
  for (int i = n; i >= 1; i--) {
    if (mi_suff[i + 1].first > a[i]) {
      mi_suff[i].first = a[i];
      mi_suff[i].second = i;
    } else {
      mi_suff[i] = mi_suff[i + 1];
    }
    if (mx_suff[i + 1].first < a[i]) {
      mx_suff[i].first = a[i];
      mx_suff[i].second = i;
    } else {
      mx_suff[i] = mx_suff[i + 1];
    }
  }
  vector<int> ans;
  for (int i = 2; i < n; i++) {
    if (mi_pref[i - 1].first < a[i] && mi_suff[i + 1].first < a[i]) {
      ans.push_back(mi_pref[i - 1].second);
      ans.push_back(i);
      ans.push_back(mi_suff[i + 1].second);
      break;
    }
    if (mx_pref[i - 1].first > a[i] && mx_suff[i + 1].first > a[i]) {
      ans.push_back(mx_pref[i - 1].second);
      ans.push_back(i);
      ans.push_back(mx_suff[i + 1].second);
      break;
    }
  }
  if (ans.empty()) {
    cout << 0 << endl;
    return 0;
  }
  cout << ans.size() << endl;
  cout << ans[0] << " " << ans[1] << " " << ans[2] << endl;
  return 0;
}
