#include <bits/stdc++.h>
using namespace std;
#define fo(i, n) for (i = 0; i < n; i++)
#define Fo(i, k, n) for (i = k; k < n ? i < n : i > n; k < n ? i += 1 : i -= 1)
#define ll long long
#define si(x) scanf("%d", &x)
#define sl(x) scanf("%lld", &x)
#define ss(s) scanf("%s", s)
#define pi(x) printf("%d\n", x)
#define pl(x) printf("%lld\n", x)
#define ps(s) printf("%s\n", s)
#define deb(x) cout << #x << "=" << x << endl
#define deb2(x, y) cout << #x << "=" << x << ", " << #y << "=" << y << endl
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define clr(x) memset(x, 0, sizeof(x))
#define sortall(x) sort(all(x))
#define tr(it, a) for (auto it = a.begin(); it != a.end(); it++)
#define PI 3.1415926535897932384626
#define M 1000000007
typedef pair<int, int> ii;
typedef pair<ll, ll> pl;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<ii> vii;


int main()
{
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    srand(chrono::high_resolution_clock::now().time_since_epoch().count());

    int t = 1, i;
   // cin >> t;

    while (t--) {
        int n,count=0;
        cin>>n;
        pair<int,int> p[n];
        fo(i, n)
        {
            cin>>p[i].first>>p[i].second;
        }
        for(int i=0;i<n;i++)
        {
            for(int j=i+1;j<n;j++)
            {
                int temp=0,temp2=0;
                temp=p[j].second-p[i].second;
                temp=abs(temp);
                temp2=p[j].first-p[i].first;
                temp2=abs(temp2);
                
                if(temp<=temp2)
                {
                    count++;
                }
            }
        }
        cout<<count;

 
    }

return 0;
}
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const long double k=0.6180339887498948482045;
ll x,y,tmp;
vector<int> ans;
int main(){
	scanf("%lld",&tmp);if(tmp==0) {printf("0\n");return 0;}
	//printf("%lf\n",((long double)tmp)*k-50);
	for(ll i=max((ll)(((long double)tmp)*k)-50,0ll);;i++){
		x=tmp;y=i;ans.clear();
		while(x&&y){
			if(x>y) ans.push_back(3),x=x-y;
			else ans.push_back(4),y=y-x;
			if(ans.size()>130) {break;}
		}
		if(ans.size()+max(x,y)<=130){
			if(x) for(int i=1;i<=x;i++) ans.push_back(1);
			else for(int i=1;i<=y;i++) ans.push_back(2);
			printf("%d\n",ans.size());
			for(int i=ans.size()-1;i>=0;i--) printf("%d\n",ans[i]);
			return 0;
		}
	}
	return 0;
}/*
47584759575744849
*/