#include<bits/stdc++.h> using namespace std; int main() {cout<<"780"<<endl; cout<<"771"<<endl; return 0; }