#include <stdio.h>
int
main (void)
{
FILE *birdfile;
int birds, days, total, i, j;
birdfile = fopen ("birds.txt", "r");
total = 0;
while (fscanf (birdfile, "%d", &days) != EOF)
{
for (j=1; j<=days; ++j)
{
fscanf (birdfile, "%d", &birds);
total = total + birds;
}
}
fclose (birdfile);
printf ("Total number of birds sighted: %d\n", total);
return(0);
}