#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9, N = 1e5 + 1;
int n, A[N], t[2][2 * N];
int op1(int a, int b) { return A[a] <= A[b] ? a : b; }
int op2(int a, int b) { return A[a] >= A[b] ? a : b; }
void build() {
  for (int x = n; x < 2 * n; x++) t[0][x] = t[1][x] = x - n;
  for (int x = n - 1; x; x--) {
    t[0][x] = op1(t[0][x << 1], t[0][x << 1 | 1]);
    t[1][x] = op1(t[1][x << 1], t[1][x << 1 | 1]);
  }
}
pair<int, int> query(int l, int r) {
  pair<int, int> ans = {l, l};
  for (l += n, r += n; l < r; l >>= 1, r >>= 1) {
    if (l & 1) {
      ans.first = op1(ans.first, t[0][l]);
      ans.second = op2(ans.second, t[1][l]);
      l++;
    }
    if (r & 1) {
      r--;
      ans.first = op1(ans.first, t[0][r]);
      ans.second = op2(ans.second, t[1][r]);
    }
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int x = 0, qwert = n; x < qwert; x++) cin >> A[x];
  build();
  for (int x = 1, qwert = n - 1; x < qwert; x++) {
    pair<int, int> l = query(0, x), r = query(x + 1, n);
    if (A[op2(l.first, r.first)] < A[x]) {
      cout << "3\n";
      cout << l.first + 1 << " " << x + 1 << " " << r.first + 1 << "\n";
      exit(0);
    } else if (A[op1(l.second, r.second)] > A[x]) {
      cout << "3\n";
      cout << l.second + 1 << " " << x + 1 << " " << r.second + 1 << "\n";
      exit(0);
    }
  }
  cout << "0\n";
}
