#include<cstdio>
#include<cmath>
using namespace std;

int main(){
	int n,max=0,a[64]={0};
	scanf("%d",&n);
	for(int i=1;i<=n;i++){
		scanf("%d",&a[i]);
		if(abs(a[i])>abs(a[max])) max=i;
	}
	if(max>0){
		printf("%d\n",2*n);
		printf("%d %d\n",max,n);
		printf("%d %d\n",max,n);
		for(int i=1;i<n;i++){
			printf("%d %d\n",n,i);
			printf("%d %d\n",n,n);
		}
	}
	else if(max<0){
		printf("%d\n",2*n);
		printf("%d %d\n",max,1);
		printf("%d %d\n",max,1);
		for(int i=n;i>1;i--){
			printf("%d %d\n",1,i);
			printf("%d %d\n",1,1);
		}
	}
	else printf("0\n");
} 