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