//#include <stdio.h>
//#include <stdlib.h>
//
//int main()
//{
// printf("Hello world!\n");
// return 0;
//}
/*
#include <stdio.h>
int stack[80001];
int top=-1;
void push(int data)
{
top++;
stack[top]=data;
}
void pop()
{
if(top!=-1) top--;
}
int main()
{
int n,str[80001],cnt=0;
scanf("%d",&n);
for(int i=1;i<=n;i++)
{
scanf("%d",&str[i]);
}
for(int i=1;i<=n;i++)
{
if(top==-1)
{
push(str[i]);
}
else
{
while(top<=str[i]&&top!=-1)
{
pop();
}
}
push(str[i]);
cnt+=top;
}
printf("%d",cnt);
}*/
////#include <stdio.h>
////int stack[31];
////int top=-1;
////void push(int data)
////{
//// top++;
//// stack[top]=data;
////}
////int pop()
////{
//// if(top!=-1)
//// return stack[top--];
////
////}
////
////int main()
////{
//// int cnt=0,num=0,s=0,a;
//// char str[31];
//// scanf("%s",str);
//// for(int i=0; str[i]!='\0'; i++)
//// {
//// if(str[i]=='(')
//// {
//// push(-100);
//// cnt++;
//// }
//// else if(str[i]=='[')
//// {
//// push(-200);
//// cnt++;
//// }
//// else if(str[i]==')')
//// {
//// num=0;
//// a=pop();
//// cnt++;
//// if(a==-100)
//// push(2);
//// else
//// {
//// while(1)
//// {
//// num+=a;
//// if(top==-1)
//// {
//// printf("0");
//// return 0;
//// }
//// a=pop();
//// if(a==-100)
//// {
//// push(num*2);
//// break;
//// }
//// if(a==-200)
//// {
//// printf("0");
//// return 0;
//// }
//// }
//// }
////
//// }
//// else if(str[i]==']')
//// {
//// num=0;
//// a=pop();
//// cnt++;
//// if(a==-200)
//// push(3);
//// else
//// {
//// while(1)
//// {
//// num+=a;
//// if(top==-1)
//// {
//// printf("0");
//// return 0;
//// }
//// a=pop();
//// if(a==-200)
//// {
//// push(num*3);
//// break;
//// }
//// if(a==-100)
//// {
//// printf("0");
//// return 0;
//// }
//// }
//// }
//// }
//// }
//// while(top!=-1)
//// {
////
//// s+=pop();
//// if(s<0)
//// {
//// printf("0");
//// return 0;
//// }
//// }
//// if(cnt%2==0)
//// printf("%d",s);
//// else
//// printf("0");
////
////}
/*
#include <stdio.h>
int stack[80001];
int top=-1;
void push(int data)
{
top++;
stack[top]=data;
}
void pop()
{
if(top!=-1) top--;
}
int main()
{
int n,str[80001],a,b,cnt;
scanf("%d",&n);
for(int i=0;i<n;i++)
{
scanf("%d",&str[i]);
push(str);
}
for(int i=1;i<n;i++)
{
a=pop();
b=pop();
if(a>b)
{
cnt++;
}
else
}
}*/
/*
#include <stdio.h>
int hamsu(int data)
{
int m=0;
for(int u=2;u*u<=data;u++)
{
if(data%u==0)
{
return 0;
}
}
return 1;
}
int solution(int nums[], size_t nums_len) {
int cnt=0;
int answer = 0,num=0,sum;
for(int i=0;i<=nums_len-3;i++)
{
for(int j=i+1;j<=nums_len-2;j++)
{
for(int k=j+1;k<=nums_len-1;k++)
{
sum=nums[i]+nums[k]+nums[j];
if(hamsu(sum))
{
cnt++;
}
}
}
}
answer=cnt;
return answer;
}
int main()
{
int nums[5] = {1,2,7,6,4};
printf("%d",solution(nums,5));
return 0;
}
*/
/*
int a;
int arr[50];
int* arr = (int*)malloc(50*sizeof(int));
*/
/*
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
char* solution(int n) {
// 리턴할 값은 메모리를 동적 할당해주세요.
char* answer = (char*)malloc(n*3*sizeof(char));
int i;
for(i=0;i<n*3;i+=3)
{
if(n%2==0) answer[i]="수";
else answer[i]="박";
}
answer[i]='\0';
return answer;
}
int main()
{
printf("%s",solution(3));
}
*/
//#include <stdio.h>
//#include <stdbool.h>
//#include <stdlib.h>
//
//long long solution(long long n) {
// long long answer = 0;
// for(int i=1;i<=n;i++)
// {
// if(n/i==i&&n%i==0)
// {
// answer=(i+1)*(i+1);
// }
// else if(i*i>n)
// {
// break;
// }
// else
// {
// answer='-1';
// }
// }
// return answer;
//}
//int main()
//{
// printf("%d",solution(answer));
//}
//n=27
//i=5
//5