#include <bits/stdc++.h>
using namespace std;
long long n, a[100010];
vector<pair<long long, long long> > v;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    while (a[i] == a[i + 1]) i++;
    v.push_back(make_pair(a[i], i + 1));
  }
  if (v.size() < 3) return cout << 0 << '\n', 0;
  for (int i = 0; i < v.size() - 2; i++) {
    if ((v[i].first > v[i + 1].first && v[i + 1].first < v[i + 2].first) ||
        (v[i].first < v[i + 1].first && v[i + 1].first > v[i + 2].first)) {
      return cout << 3 << '\n'
                  << v[i].second << ' ' << v[i + 1].second << ' '
                  << v[i + 2].second << '\n',
             0;
    }
  }
  cout << 0 << '\n';
  return 0;
}
