#include <bits/stdc++.h>
using namespace std;
void run_once() { ios::sync_with_stdio(false); }
map<long, long> l1, l2, r1, r2;
int main() {
  run_once();
  long n;
  cin >> n;
  long arr[n];
  for (long i = 0; i < n; i++) {
    cin >> arr[i];
  }
  long min = arr[0];
  long index = 0;
  for (long i = 1; i < n; i++) {
    if (min < arr[i]) {
      l1[i] = index;
    }
    if (min > arr[i]) {
      min = arr[i];
      index = i;
    }
  }
  min = arr[n - 1];
  index = n - 1;
  for (long i = n - 2; i >= 0; i--) {
    if (min < arr[i]) {
      l2[i] = index;
    }
    if (min > arr[i]) {
      min = arr[i];
      index = i;
    }
  }
  long max = arr[0];
  index = 0;
  for (long i = 1; i < n; i++) {
    if (max > arr[i]) {
      r1[i] = index;
    }
    if (max < arr[i]) {
      max = arr[i];
      index = i;
    }
  }
  max = arr[n - 1];
  index = n - 1;
  for (long i = n - 2; i >= 0; i--) {
    if (max > arr[i]) {
      r2[i] = index;
    }
    if (max < arr[i]) {
      max = arr[i];
      index = i;
    }
  }
  for (long i = 1; i <= n - 2; i++) {
    if (l1.find(i) != l1.end() && l2.find(i) != l2.end()) {
      cout << "3"
           << "\n";
      cout << l1[i] + 1 << " " << i + 1 << " " << l2[i] + 1 << "\n";
      return 0;
    }
    if (r1.find(i) != r1.end() && r2.find(i) != r2.end()) {
      cout << "3"
           << "\n";
      cout << r1[i] + 1 << " " << i + 1 << " " << r2[i] + 1 << "\n";
      return 0;
    }
  }
  cout << "0"
       << "\n";
  return 0;
}
