#include <bits/stdc++.h>
using namespace std;
bool ok;
int n;
vector<pair<int, int> > a;
int main() {
  cin >> n;
  for (int b, i = 1; i <= n; i++) {
    cin >> b;
    if (i == 1)
      a.push_back(make_pair(b, i));
    else {
      if (b != a[a.size() - 1].first) a.push_back(make_pair(b, i));
    }
  }
  n = a.size();
  if (n < 3) {
    cout << 0;
    return 0;
  }
  for (int i = 1; i < n - 1; i++) {
    if (a[i] > a[i - 1] && a[i] > a[i + 1]) {
      cout << 3 << endl;
      cout << a[i - 1].second << " " << a[i].second << " " << a[i + 1].second
           << endl;
      return 0;
    }
    if (a[i] < a[i - 1] && a[i] < a[i + 1]) {
      cout << 3 << endl;
      cout << a[i - 1].second << " " << a[i].second << " " << a[i + 1].second;
      return 0;
    }
  }
  cout << 0;
  return 0;
}
