#include <bits/stdc++.h>
using namespace std;
long long int n;
vector<long long int> an;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    int h;
    cin >> h;
    an.push_back(h);
  }
  vector<pair<long long int, long long int> > ne;
  ne.push_back(make_pair(1, an[0]));
  for (int i = 1; i < n; i++) {
    if (an[i] == an[i - 1]) {
      ne[ne.size() - 1].first++;
    } else {
      ne.push_back(make_pair(1, an[i]));
    }
  }
  pair<long long int, pair<long long int, long long int> > ans;
  ans.first = -1;
  for (int i = 0; i + 2 < ne.size(); i++) {
    if ((ne[i].second > ne[i + 1].second) !=
        (ne[i + 1].second > ne[i + 2].second)) {
      ans = make_pair(ne[i].second,
                      make_pair(ne[i + 1].second, ne[i + 2].second));
      break;
    }
  }
  if (ans.first == -1) {
    cout << 0 << endl;
    return 0;
  }
  long long int i = 0;
  while (an[i] != ans.first) i++;
  ans.first = i + 1;
  while (an[i] != ans.second.first) i++;
  ans.second.first = i + 1;
  while (an[i] != ans.second.second) i++;
  ans.second.second = i + 1;
  cout << 3 << endl
       << ans.first << " " << ans.second.first << " " << ans.second.second
       << endl;
}
