#include<iostream>
#include<iomanip>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<cstring>
#define maxn 55
using namespace std;
int n,a[maxn],b,minnum=0,pos;
bool tag;
int main()
{
	scanf("%d",&n);
	for(int i=1;i<=n;++i)
	{
	scanf("%d",&a[i]);
	if(abs(a[i])>minnum) {
		minnum=abs(a[i]);
		if(a[i]<0) tag=true;
		else tag=false;
		pos=i;
			}
	}
	if(minnum==0)
	{
		cout<<0;
		return 0;
	}
	cout<<2*n<<endl;
if(tag)   {
	cout<<pos<<' '<<1<<endl;
	cout<<pos<<' '<<1<<endl;
	for(int i=n;i>=2;--i)
	{
		cout<<1<<' '<<i<<endl;
		cout<<1<<' '<<1<<endl;
	}
return 0;
}
if(!tag)
{
	cout<<pos<<' '<<n<<endl;
	cout<<pos<<' '<<n<<endl;
	for(int i=1;i<=n-1;++i)
	{
		cout<<n<<' '<<i<<endl;
		cout<<n<<' '<<n<<endl;
	}
	return 0;
}
return 0; 
}