#include #include #include using namespace std; int main() { int a,b; for (int i = 0; i < 1000; ++i) { cin>>a>>b; } cout<<500<