#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  if (n < 3) {
    cout << 0 << endl;
    return 0;
  }
  vector<long long> v;
  for (long long i = 0; i < n; i++) {
    long long temp;
    cin >> temp;
    v.push_back(temp);
  }
  bool big = false, smal = false;
  vector<long long> ans;
  ans.push_back(1);
  for (long long i = 1; i < n; i++) {
    if (v[i] > v[i - 1]) {
      if (smal == true) ans.push_back(i), ans.push_back(i + 1);
      smal = false;
      big = true;
    }
    if (v[i] < v[i - 1]) {
      if (big == true) ans.push_back(i), ans.push_back(i + 1);
      smal = true;
      big = false;
    }
  }
  if (ans.size() > 1) {
    cout << 3 << endl;
    for (long long i = 0; i < 3; i++) cout << ans[i] << " ";
    cout << endl;
  } else {
    cout << 0 << endl;
  }
  return 0;
}
