/* http://ufcpp.net/study/algorithm/o_days.html */
#include <iostream>
using namespace std;

int GetDays(int y, int m, int d)
{
  if (m <= 2)y-- , m += 12;
  int dy = 365 * (y - 1);
  int c = y / 100;
  int dl = (y >> 2) - c + (c >> 2);
  int dm = (m * 979 - 1033) >> 5; 
  return dy + dl + dm + d - 1;
}

int main(){
	int a,b,c,d,e,f;
	while(cin >> a >> b >> c >> d >> e >> f , a != -1){
		cout << GetDays(d,e,f) - GetDays(a,b,c) << endl;
	}
}