//1vector可变容器
//2stack栈:先进先出
//3queue队列
//4dequeue双队列
//5priority_queue优先队列
//6map
//7pair
//8string
/*A#include<vector>
#include<iostream>
using namespace std;
vector<string>VS;
int main(){
int N;
cin>>N;
for(int i=0;i<N;i++){
string a;
cin>>a;
VS.push_back(a);
}
for(int i=0;i<N;i++){
cout<<VS[N-i-1]<<"\n";
}
return 0;
}*/
/*B
#include<iostream>
#include<queue>
using namespace std;
int main(){
int N;
cin>>N;
int nn;
while(N--){
priority_queue<int>q;
int n;
cin>>n;
char s;
for(int i=0;i<n;i++){
int num;
cin>>s;
num=s-'a'+1;
q.push(num);
}
cout<<q.top()<<endl;
}
return 0;
}*/
/*C
#include<iostream>
#include<cmath>
using namespace std;
int main(){
int n;
cin>>n;
while(n--){
string a,b;
cin>>a>>b;
bool ok=0;
for(int i=0;i<b.size();i++)
{
if(b[i]=='a')
{
ok=1;
break;
}
}
if(ok)
{
if(b.size()==1) cout<<1<<endl;
else cout<<-1<<endl;
}
else
{
long long res=1;
int len=a.size();
res=pow(2,a.size());
cout<<res<<endl;
}
}
return 0;
}
*/
/*
#include<iomanip>
#include<iostream>
using namespace std;
int main(){
double A,B,C,X;
cin>>A>>B>>C>>X;
if(X<=A){
cout<<"1.000000000000";
return 0;
}
if(X>B){
cout<<"0.000000000000";
return 0;
}
if(X>A&&X<=B){
double ans=C/(B-A);
cout<<fixed<<setprecision(12)<<ans;
}
return 0;
}
*/
/*#include<iomanip>
#include<iostream>
#include<cmath>
#include<algorithm>
using namespace std;
#define ll long long
ll solve_mid(ll a,ll b){
ll c=ceil(1.0*(a+b)/2);
return c;
}
int main(){
int n;
cin>>n;
while(n--){
int tower;
cin>>tower;
ll blk[tower];
cin>>blk[0];
int ct=1;
for(int i=1;i<tower;i++){
int tep;
cin>>tep;
if(tep>blk[0]){
blk[ct++]=tep;
}
}
sort(blk,blk+ct-1);
if(blk[ct-1]<blk[0]){
cout<<blk[0]<<endl;
break;
}
ll ans=blk[0];
for(int i=1;i<ct;i++){
ans=solve_mid( ans,blk[i] );
}
cout<<ans<<endl;
}
return 0;
}*/
/*
#include<iostream>
#include<iomanip>
#include<cmath>
#include<algorithm>
using namespace std;
void solve()
{
int n;
cin >> n;
int a[n];
for(int i = 0;i < n;++i)
cin >> a[i];
sort(a,a+n);
for(int i = 1;i < n;++i)
{
int k = a[i] - a[0];
if(k > 0)
{
k = (k + 1) >> 1;
a[0] += k;
}
}
cout << a[0] << endl;
}
int main()
{
int t = 1;
cin >> t;
while(t--)
solve();
return 0;
}*/
/*F
#include <iostream>
#include<iomanip>
#include<cmath>
#include<algorithm>
#include<queue>
using namespace std;
int main()
{
cout << fixed;
cout.precision(18);
int t;
cin >> t;
while (t--)
{
priority_queue<int> q;
int n, sum = 0;
cin >> n;
for (int i = 1; i <= n; i++)
{
int x;
cin >> x;
sum += __lg(x & (-x));
q.push(__lg(i & (-i)));
}
if(sum >= n)
{
cout << "0\n";
continue;
}
int ans = 0;
while(!q.empty())
{
sum += q.top();
q.pop();
ans++;
if(sum >= n)
break;
}
if(sum < n)
cout << -1 << endl;
else
cout << ans << endl;
}
return 0;
}*/
/*
#include <iostream>
#include<iomanip>
#include<cmath>
#include<algorithm>
#include<queue>
using namespace std;
int main()
{
int T;
cin>>T;
while(T--){
int n;
cin>>n;
int ans=0;
while(n--){
int a;
cin>>a;
if(a%2!=0){
ans++;
}
}
cout<<ans<<endl;
}
return 0;
}*/
/*firstI
#include <iostream>
#include<iomanip>
#include<cmath>
#include<algorithm>
using namespace std;
string s;
int main () {
cin>>s;
if(s[0]>='A'&&s[0]<='Z'){
for(int i=1;i<=6;i++){
if(! (s[i]-'0'>0&&s[i]-'0'<=9) ){
cout<<"No";
break;
}
}
if(s[7]>='a'&&s[7]<='z')cout<<"Yes";
else cout<<"No";
}else cout<<"No";
return 0;
}*/
/*I
#include <iostream>
#include<iomanip>
#include<cmath>
#include<algorithm>
using namespace std;
int main(){
string s;
cin>>s;
int n=0;
for(int i=1;i<=6;i++){
n*=10;
n+=s[i]-'0';
}
if(s[0]>='A'&&s[0]<='Z'&&s[7]>='A'&&s[7]<='Z')
if(n>=100000&&n<=999999)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
else
cout<<"No"<<endl;
return 0;
}
*/
/*F
#include <iostream>
#include<iomanip>
#include<cmath>
#include<algorithm>
using namespace std;
int main()
{
int T;cin>>T;
while(T--)
{
int n;cin>>n;
int sum=0;
for(int i=0;i<n;i++)
{
int x;cin>>x;
sum+=__builtin_ctz(x);
}
vector<int> cnt(20);
for(int i=1;i<=n;i++)
cnt[__builtin_ctz(i)]++;
int ans=0;
for(int i=19;i>=0;i--)
while(sum<n && cnt[i])
{
sum+=i;
cnt[i]--;
ans++;
}
if(sum<n) ans=-1;
cout<<ans<<endl;
}
return 0;
}
*/
/*E
#include<iomanip>
#include<iostream>
#include<cmath>
#include<algorithm>
using namespace std;
#define ll long long
ll solve_mid(ll a,ll b){
ll c=ceil(1.0*(a+b)/2);
return c;
}
int main(){
int t;
cin>>t;
while(t--){
int n;
cin>>n;
int a[n];
for(int i=0;i<n;i++){
cin>>a[i];
}
sort(a+1,a+n);
for(int i=1;i<n;i++){
if(a[0]<a[i]){
a[0]=(a[0]+a[i]+1)/2;
}
}
cout<<a[0]<<endl;
}
return 0;
}
*/