#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
using namespace std;

int main()
{
    int n;
    cin >> n;
    int a;
    for (int i=1;i<=2*n;i++)
    {
        cin >> a;
    }
    cout << (n+2)/3;
}
