# data[].attributes.body
#include<bits/stdc++.h>

using namespace std;

int a,b,d,e;

int tong(int n)

{

int sum=0;

while (n>0)

{

sum = sum + (n%10);

n = n/10;

}

return sum;

}

int main()

{

cin >> a >> b;

d = a;

e = b;

if (tong(d)>tong(e))

{

cout << a;

}

else

{

cout << b;

}

}

# data[].attributes.body
#include <bits/stdc++.h>

using namespace std;

int a,b;

int Max(int x,int y)

{

if(x>y)

return x;

else return y;

}

int tong(int n)

{

int s=0;

while(n>0)

{

s=s+n%10;

n=n/10;

}

return s;

}

int main()

{

cin>>a>>b;

if(Max(tong(a),tong(b))==tong(a))

cout<<a;

else

cout<<b;

}

# data[].attributes.body
#include<bits/stdc++.h>

using namespace std;

int a, b, ivan, till;

int tong( int sua )

{

int mizi=0;

while(sua>0)

{

mizi+=sua%10;

sua/=10;

}

return mizi;

}

int main()

{

cin>>a>>b;

ivan=tong(a);

till=tong(b);

if(ivan>till)

cout<<a;

else cout<<b;

}

# data[].attributes.body
1234

126

-> 1234

# data[].attributes.body
#include<bits/stdc++.h>

using namespace std;

int n;

int tong (int a)

{

int sum=0;

while (a>0)

{

sum = sum + (a%10);

a = a/10;

}

return sum;

}

int scp (int a)

{

int c=0;

for(int i=1;i<=a;i++)

{

if (i*i==a)

{

c=1;

break;

}

else

{

c=0;

}

}

return c;

}

int main()

{

cin >> n;

if(scp(tong(n))==1)

{

cout << tong(n);

}

else

{

cout << n;

}

}

# data[].attributes.body
#include <bits/stdc++.h>

using namespace std;

int quanbell , nhatdz;

int mai(int a , int b)

{

if(a > b)

return a;

else

return b;

}

int anhducgiontan(int n)

{

int menmen = 0;

while(n > 0)

{

menmen += n % 10;

n /= 10;

}

return menmen;

}

int main()

{

cin>>quanbell>>nhatdz;

if(mai((quanbell),(nhatdz)) == anhducgiontan(quanbell))

cout<<quanbell;

else

cout<<nhatdz;

}

# data[].attributes.body
#include<bits/stdc++.h>

using namespace std;

int n, c, y;

int mizisua(int sua )

{

int mizi=0;

while(sua>0)

{

mizi+=sua%10;

sua/=10;

}

return mizi;

}

int main()

{

cin>>n;

y=mizisua(n);

c=sqrt(y);

if(c*c==y)

cout<<y;

else cout<<n;

}

# data[].attributes.body
#include <bits/stdc++.h>

using namespace std;

int tong(int n) {

int sum = 0;

while (n > 0) {

sum += n % 10;

n /= 10;

}

return sum;

}

int main() {

int a, b;

cin >> a >> b;

int suma (a);

int sumb (b);

if (suma > sumb) {

cout << a << endl;

} else if (suma < sumb) {

cout << b << endl;

} else {

}

return 0;

}

# data[].attributes.body
#include <bits/stdc++.h>

using namespace std;

int n;

bool scp(int n)

{

int k=sqrt(n);

if(k*k==n)

return 1;

else

return 0;

}

int tong(int n)

{

int s=0;

while(n>0)

{

s=s+n%10;

n=n/10;

}

return s;

}

int main()

{

cin>>n;

if(scp(tong(n))==1)

cout<<tong(n);

else

cout<<n;

}