#include<iostream>
#include<stdlib.h>
#define MAX 100000
using namespace std;
void init();
void find();
typedef struct node{
int num;
int len;
node* next;
}node;
typedef struct road{
node* matrix[10001];
}road;
road *p = (road*)malloc(sizeof(road));
int n, m;
int a[10001];
int FLAG = 1;
int cnt = 0;
int main(){
init();
find();
cout << cnt << endl;
}
void init(){
int u, v, s;
cin >&g