stablegradients/pie-gem5-bysrc huggingface dataset:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

int main(){

	signed long long a,b,c=0,d=0;

	cin>>a>>b;

	for(signed long long i=a;i<=b;i++){

		if(i<0){

			c++;

		}

		if(i==0){

			d=1;

		}

	}

	if(d==1){

		cout<<"Zero"<<endl;

	}else{

		if(c%2==0){

			cout<<"Positive"<<endl;

		}else{

			cout<<"Negative"<<endl;

		}

	}

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

using namespace std;

int main(){

    int a,b;

    scanf("%d%d",&a,&b);

    if(a>0)

        printf("Positive");             

    else if(b>=0)

        printf("Zero");          

    else if((a&1)^(b&1))

        printf("Positive");

    else 

        printf("Negative");

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

int a,b;

int main() {

	ios::sync_with_stdio(false);

	cin >> a >> b;

	if(a <= 0 && b >= 0)

		cout << "Zero\n";

	else if(a > 0 || abs(b) - abs(a) & 1)

		cout << "Positive\n";

	else

		cout << "Negative\n";

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

using namespace std;

int main(){

    int a,b;

    scanf("%d%d",&a,&b);

    if(a>0)

        printf("Positive");             

    else if(b>=0)

        printf("Zero");          

    else if((a&1)^(b&1))

        printf("Positive");

    else 

        printf("Negative");

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

int a,b;

int main()

{

    cin>>a>>b;

    if(a>0)cout<<"Positive";

    else if(a==0||(a<0&&b>0))cout<<"Zero";

    else if((abs(b)-abs(a))%2!=0)cout<<"Positive";

    else cout<<"Negative";

    return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

using namespace std;

int main(){

    int a,b;

    scanf("%d%d",&a,&b);

    if(a>0)

        printf("Positive");             

    else if(b>=0)

        printf("Zero");          

    else if((a&1)^(b&1))

        printf("Positive");

    else 

        printf("Negative");

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<map>

#include<cmath>

#include<stack>

#include<queue>

#include<cstdio>

#include<vector>

#include<cstring>

#include<iostream>

#include<algorithm>

using namespace std;

typedef long long ll;

int a,b;

int main(){

    scanf("%d%d",&a,&b);

    if(a>0&&b>0)puts("Positive");

    else if(max(a,b)>=0&&min(a,b)<=0)puts("Zero");

    else if((abs(max(a,b))-abs(min(a,b)))%2==0)puts("Negative");

    else puts("Positive");

    return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

using namespace std;

int a,b;

int main(){

    scanf("%d%d",&a,&b);

    if(a>0)puts("Positive");             

    else if(b>=0)puts("Zero");             

    else if((a&1)^(b&1))puts("Positive");  

    else puts("Negative");

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

int main()

{

    int a,b;

    cin>>a>>b;

    if(a>0)

    {

        cout<<"Positive";  

    }

    else if(b>=0)

    {

        cout<<"Zero";  

    }

    else if((a&1)^(b&1))

    {

        cout<<"Positive";  

    }

    else 

    {

        cout<<"Negative";

    }

    return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

using namespace std;

int a,b;

int main(){

    scanf("%d%d",&a,&b);

    if(a>0)puts("Positive");             

    else if(b>=0)puts("Zero");             

    else if((a&1)^(b&1))puts("Positive");  

    else puts("Negative");

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

int a,b;

int main(){

    scanf("%d%d",&a,&b);

    if(a>0)puts("Positive");               

    else if(b>=0)puts("Zero");            

    else if((a&1)^(b&1))puts("Positive");  

    else puts("Negative");

    return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

using namespace std;

int a,b;

int main(){

    scanf("%d%d",&a,&b);

    if(a>0)puts("Positive");             

    else if(b>=0)puts("Zero");             

    else if((a&1)^(b&1))puts("Positive");  

    else puts("Negative");

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<iomanip>

#include<cstring>

#include<cstdio>

#include<cmath>

#include<algorithm>

#include<set>

#include<map>

using namespace std;

int main() {

    int a,b,ans=0;

    cin>>a>>b;

    if(a<=0&&b>=0){puts("Zero");return 0;}

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

	  ans+=i<0?1:0;

	if(ans%2==1)puts("Negative");

	else puts("Positive");

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

using namespace std;

int a,b;

int main(){

    scanf("%d%d",&a,&b);

    if(a>0)puts("Positive");             

    else if(b>=0)puts("Zero");             

    else if((a&1)^(b&1))puts("Positive");  

    else puts("Negative");

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<cstdio>

using namespace std;

int a,b;

int main(){

	scanf("%d %d",&a,&b);

	if(a==0||b==0){

		printf("Zero");

		return 0;

	}

	if(a>0&&b>0){

		printf("Positive");

		return 0;

	}

	if((a>0&&b<0)||(b>0&&a<0)){

		printf("Zero");

		return 0;

	}

	if(a<0&&b<0){

		if(b>a){

			if((b-a+1)%2==0){

				printf("Positive");

			}else{

				printf("Negative");

			}

		}else{

			if((a-b+1)%2==0){

				printf("Positive");

			}else{

				printf("Negative");

			}

		}

	}

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

using namespace std;

int a,b;

int main(){

    scanf("%d%d",&a,&b);

    if(a>0)puts("Positive");               //情况1

    else if(b>=0)puts("Zero");             //情况2

    else if((a&1)^(b&1))puts("Positive"); 

    else puts("Negative");



}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<string.h>

#include<cmath>

using namespace std;

int n;

int main()

{

	int m,sum=0;

	cin>>n>>m;

	if(n<=0&&m>=0)

	{

		cout<<"Zero"<<endl;

		return 0;

	}

	for(int i=n;i<=m;i++)

	{

		if(i<0)

		sum++;

	}

	if(sum%2!=0)

	{

		cout<<"Negative"<<endl;

	}

	else

	{

		cout<<"Positive"<<endl;

	} 

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

using namespace std;

int a,b;

int main(){

    scanf("%d%d",&a,&b);

    if(a>0)puts("Positive");               //情况1

    else if(b>=0)puts("Zero");             //情况2

    else if((a&1)^(b&1))puts("Positive");  //情况3

    else puts("Negative");

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

int main(){

    int a,b;

    cin>>a>>b;

    if(a>0) cout<<"Positive\n";

    else if(b>=0) cout<<"Zero\n";

    else if((abs(b)-abs(a)+1)%2==0) cout<<"Positive\n";

    else cout<<"Negative\n";

    return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

using namespace std;

int a,b;

int main(){

    scanf("%d%d",&a,&b);

    if(a>0)puts("Positive");               //情况1

    else if(b>=0)puts("Zero");             //情况2

    else if((a&1)^(b&1))puts("Positive");  //情况3

    else puts("Negative");

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

int main()

{

    int a,b,s=1;

    cin>>a>>b;

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

    {  

      if(i<0)

	  s*=-1;

      if(i==0)

	  {

	  cout<<"Zero"<<endl;

	  return 0;

	  } 

    }

    if(s>0)cout<<"Positive"<<endl;

    if(s<0)cout<<"Negative"<<endl;

    if(s==0)cout<<"Zero"<<endl;

    return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

using namespace std;

int a,b;

int main(){

    scanf("%d%d",&a,&b);

    if(a>0)puts("Positive");               //情况1

    else if(b>=0)puts("Zero");             //情况2

    else if((a&1)^(b&1))puts("Positive");  //情况3

    else puts("Negative");

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

int main()

{

	int a,b,n,i,s=1;

	cin>>a>>b;

	if(a>0) cout<<"Positive"<<endl;

	else if(a<=0&&b>=0) cout<<"Zero"<<endl;

	else if((abs(min(a,b))-abs(max(a,b)))%2==0) cout<<"Negative"<<endl;

	else cout<<"Positive"<<endl;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

using namespace std;

int a,b;

int main(){

    scanf("%d%d",&a,&b);

    if(a>0)puts("Positive");               //情况1

    else if(b>=0)puts("Zero");             //情况2

    else if((a&1)^(b&1))puts("Positive");  //情况3

    else puts("Negative");

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include"bits/stdc++.h"

using namespace std;

int a,b;



int main(){

    cin>>a>>b;

    if(a>0)cout<<"Positive";

    else if(a==0||(a<0&&b>0))cout<<"Zero";

    else if((abs(b)-abs(a))%2!=0)cout<<"Positive";

    else cout<<"Negative";

    return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

using namespace std;

int a,b;

int main(){

    scanf("%d%d",&a,&b);

    if(a>0)puts("Positive");               //情况1

    else if(b>=0)puts("Zero");             //情况2

    else if((a&1)^(b&1))puts("Positive");  //情况3

    else puts("Negative");

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;

#define vec(type) vector<type>



int main() {

	int a, b;

	cin >> a >> b;



	if (a <= 0 && 0 <= b) cout << "Zero" << endl;

	else if (a > 0) cout << "Positive" << endl;

	else if (b < 0)

		if ((b-a)%2==1) cout << "Positive" << endl; 

		else cout << "Negative" << endl;

}

// Optimized solution to the same problem (faster):
#include <stdio.h>

int main(){int a,b;scanf("%d%d",&a,&b);if(a<=0&&0<=b) printf("Zero");else if(a>0||(b-a)%2==1) printf("Positive");else printf("Negative");}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;

#define vec(type) vector<type>



int main() {

	int a, b;

	cin >> a >> b;



	if (a <= 0 && 0 <= b) cout << "Zero" << endl;

	else if (a > 0) cout << "Positive" << endl;

	else if ((b-a)%2==1) cout << "Positive" << endl; 

	else cout << "Negative" << endl;

}

// Optimized solution to the same problem (faster):
#include <stdio.h>

int main(){int a,b;scanf("%d%d",&a,&b);if(a<=0&&0<=b) printf("Zero");else if(a>0||(b-a)%2==1) printf("Positive");else printf("Negative");}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

#define rep(i, n) for (int i = 0; i < n; ++i)

#define FOR(i, a, b) for (int i = a; i < b; ++i)

#define ALL(vec) vec.begin(), vec.end()

#define rALL(vec) vec.rbegin(), vec.rend()

using namespace std;

using ll = long long;

// ------------------------------



int main() {

    ll a, b;

    cin >> a >> b;

    if (a*b <= 0) cout << "Zero" << endl;

    else if (a > 0) cout << "Positive" << endl;

    else {

        if ((a - b) % 2 == 0) cout << "Negative" << endl;

        else cout << "Positive" << endl;

    }

    return 0;

}

// Optimized solution to the same problem (faster):
#include <stdio.h>



int main() {

    int a, b;

    scanf("%d %d", &a, &b);



    int sum = a + b;



    if (sum > b) {

        printf("Positive");

    } else if (sum >= a) {

        printf("Zero");

    } else {

        if (sum & 1) {

            printf("Positive");

        } else {

            printf("Negative");

        }

    }

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <cmath>

#include <string>

#include <algorithm>

#include <cstdio>

using namespace std;

int main()

{

    int a,b,c,d=0;

    int x[20]; int s=1;

     cin>>a>>b; if(a<=0&&b>=0)

      cout<<"Zero"<<endl;

      if(a>0&&b>0)

        cout<<"Positive"<<endl;

      if(a<0&&b<0)

        { for(int i=a;i<=b;i++)

         {

             if(i<=b) d++;

             }

      if(d%2==0) cout<<"Positive"<<endl;

      else cout<<"Negative"<<endl;

      }

       return 0;

}
















// Optimized solution to the same problem (faster):
#include<cstdio>

#include<cstring>

#include<algorithm>

using namespace std;



int a,b;



int main()

{

	scanf("%d %d",&a,&b);

	if(a<=0 && b>=0)

		puts("Zero");

	else if(a>0 && b>0)

		puts("Positive");

	else

		puts((b-a)&1?"Positive":"Negative");

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<cstdio>

#include<cmath>

#include<cstring>

#include<string>

#include<iomanip>

using namespace std;

int main()

{

	int a,b;

	int sum=0;

	cin>>a>>b;

	if(a<=0&&b>=0)

	{

		cout<<"Zero"<<endl;

	}

	else if(a>0&&b>0)

	{

		cout<<"Positive"<<endl;

	}

	else if(a<0&&b<0)

	{

		sum=b-a+1;

		if(sum%2==0) cout<<"Positive"<<endl;

		else cout<<"Negative"<<endl;

	}

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<cstring>

#include<algorithm>

using namespace std;



int a,b;



int main()

{

	scanf("%d %d",&a,&b);

	if(a<=0 && b>=0)

		puts("Zero");

	else if(a>0 && b>0)

		puts("Positive");

	else

		puts((b-a)&1?"Positive":"Negative");

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <algorithm>

#include <stdio.h>

#include <string.h>

using namespace std;

int main()

{

    long long int a,b;

    scanf("%lld %lld",&a,&b);

    if(a<0&&b>0||a==0||b==0)

        printf("Zero\n");

    else if(a>0)

        printf("Positive\n");

    else if(b<0)

    {

        if((b-a)%2==0)

            printf("Negative\n");

        else

            printf("Positive\n");

    }

    return 0;

}




// Optimized solution to the same problem (faster):
#include<cstdio>

#include<cstring>

#include<algorithm>

using namespace std;



int a,b;



int main()

{

	scanf("%d %d",&a,&b);

	if(a<=0 && b>=0)

		puts("Zero");

	else if(a>0 && b>0)

		puts("Positive");

	else

		puts((b-a)&1?"Positive":"Negative");

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include<cstdio>

#include<cstring>

#include<cstdlib>

#include<algorithm>

using namespace std;





int main()

{

    long long int a,b;

    while(scanf("%lld %lld",&a,&b)!=EOF)

    {

        if(a<0)

        {

            if(b>=0)

                printf("Zero\n");

            else if((b-a)%2==0)

                printf("Negative\n");

            else

                printf("Positive\n");

        }

        else if(a==0)

            printf("Zero\n");

        else

            printf("Positive\n");

    }



}

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<cstring>

#include<algorithm>

using namespace std;



int a,b;



int main()

{

	scanf("%d %d",&a,&b);

	if(a<=0 && b>=0)

		puts("Zero");

	else if(a>0 && b>0)

		puts("Positive");

	else

		puts((b-a)&1?"Positive":"Negative");

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

int a,b,c;

int main()

{

	cin>>a>>b;

	if(a>b)swap(a,b);

	if(a<=0&&b>=0)

	{

		printf("Zero\n");

		return 0;

	}

	if(a>0&&b>0)

	{

		printf("Positive\n");

		return 0;

	}

	c=b-a;

	if(c%2==1)

	{

		printf("Positive\n");

		return 0;

	}else 

	{

		printf("Negative\n");

		return 0;

	}

}

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<cstring>

#include<algorithm>

using namespace std;



int a,b;



int main()

{

	scanf("%d %d",&a,&b);

	if(a<=0 && b>=0)

		puts("Zero");

	else if(a>0 && b>0)

		puts("Positive");

	else

		puts((b-a)&1?"Positive":"Negative");

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>



using namespace std;

int n;

int main (){

    cin >> n;

    int mn = 1e9;

    for(int i = 1; i < n; i++){

        int j = n - i;

        int j2 = i;

        int sum = 0;

        while(j > 0){

            sum += j % 10;

            j /= 10;

        }

        while(j2 > 0){

            sum += j2 % 10;

            j2 /= 10;

        }

        mn = min(sum, mn);

    }

    cout << mn;

}


// Optimized solution to the same problem (faster):
#include <cstdio>



using namespace std; 



int sum_of_digit[100001];



int main() {

    int N;

    scanf("%d", &N);



    int prefix_sum = 0;

    int cur_sum = 0;

    for (int i = 0; i < N; i++) {

        int cur_digit_sum = 0;

        int cur_number = i;

        while (cur_number > 0) {

            cur_digit_sum += cur_number % 10;

            cur_number /= 10;

        }

        sum_of_digit[i] = cur_digit_sum;

    }

    

    int min = (1 << 31) - 1;

    int round = (N >> 1) + 1;

    for (int i = 1; i <= round; i++) {

        int pair = N - i;

        if (pair >= i) {

            int temp = sum_of_digit[i] + sum_of_digit[pair];

            if (temp < min) {

                min = temp;   

            }

        } else {

            break;

        }

    }

    printf("%d\n", min);

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<cstdio>

#include<iostream>

using namespace std;

int main()

{

	int n;

	scanf("%d", &n);

	int tot = 0;

	while(n)

	{

		tot += n%10;

		n /= 10;

	}

	if(tot==1)

		cout<<10;

	else

		cout<<tot;

}

// Optimized solution to the same problem (faster):
#include <cstdio>



using namespace std; 



int sum_of_digit[100001];



int main() {

    int N;

    scanf("%d", &N);



    int prefix_sum = 0;

    int cur_sum = 0;

    for (int i = 0; i < N; i++) {

        int cur_digit_sum = 0;

        int cur_number = i;

        while (cur_number > 0) {

            cur_digit_sum += cur_number % 10;

            cur_number /= 10;

        }

        sum_of_digit[i] = cur_digit_sum;

    }

    

    int min = (1 << 31) - 1;

    int round = (N >> 1) + 1;

    for (int i = 1; i <= round; i++) {

        int pair = N - i;

        if (pair >= i) {

            int temp = sum_of_digit[i] + sum_of_digit[pair];

            if (temp < min) {

                min = temp;   

            }

        } else {

            break;

        }

    }

    printf("%d\n", min);

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>



using namespace std;



typedef long long ll;

const int maxn = (int) 2e5 + 1;





int n;

int ans = maxn;

int get(int x){

    int y = n - x, res = 0;

    while(x > 9){

        res += (x % 10);

        x /= 10;

    }

    res += x;

    while(y > 9){

        res += (y % 10);

        y /= 10;

    }

    res += y;

    return res;

}





int main(){

    cin >> n;

    for(int i = 1; i <= n / 2; i++){

        ans = min(ans, get(i));

    }

    cout << ans ;

}


// Optimized solution to the same problem (faster):
#include <cstdio>



using namespace std; 



int sum_of_digit[100001];



int main() {

    int N;

    scanf("%d", &N);



    int prefix_sum = 0;

    int cur_sum = 0;

    for (int i = 0; i < N; i++) {

        int cur_digit_sum = 0;

        int cur_number = i;

        while (cur_number > 0) {

            cur_digit_sum += cur_number % 10;

            cur_number /= 10;

        }

        sum_of_digit[i] = cur_digit_sum;

    }

    

    int min = (1 << 31) - 1;

    int round = (N >> 1) + 1;

    for (int i = 1; i <= round; i++) {

        int pair = N - i;

        if (pair >= i) {

            int temp = sum_of_digit[i] + sum_of_digit[pair];

            if (temp < min) {

                min = temp;   

            }

        } else {

            break;

        }

    }

    printf("%d\n", min);

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<map>

#include<cmath>

#include<cstdio>

#include<cstdlib>

#include<cstring>

#include<iostream>

#include<algorithm>

using namespace std;

long long n,m,sum,kk,jk,a[2];

int main(){

	scanf("%lld",&n);

	m=n;

	while(m!=0){

		kk=m%10;

		if(kk!=0){

			++jk;

			a[0]=kk;

		}

		sum+=kk;

		m/=10;

	}

	if(jk==1&&a[0]==1)printf("%lld",sum*10);

	else printf("%lld",sum);

}

// Optimized solution to the same problem (faster):
#include <cstdio>



using namespace std; 



int sum_of_digit[100001];



int main() {

    int N;

    scanf("%d", &N);



    int prefix_sum = 0;

    int cur_sum = 0;

    for (int i = 0; i < N; i++) {

        int cur_digit_sum = 0;

        int cur_number = i;

        while (cur_number > 0) {

            cur_digit_sum += cur_number % 10;

            cur_number /= 10;

        }

        sum_of_digit[i] = cur_digit_sum;

    }

    

    int min = (1 << 31) - 1;

    int round = (N >> 1) + 1;

    for (int i = 1; i <= round; i++) {

        int pair = N - i;

        if (pair >= i) {

            int temp = sum_of_digit[i] + sum_of_digit[pair];

            if (temp < min) {

                min = temp;   

            }

        } else {

            break;

        }

    }

    printf("%d\n", min);

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <algorithm>

#include <tuple>

#include <cmath>

#include <string>

#include <queue>

#include <vector>

#include <set>

#include <stack>

#include <map>



#define mt make_tuple



using namespace std;



int sum_digit(int n) {

	return n ? sum_digit(n/10) + n%10 : n;

}



int main() {

	int n;

	cin >> n;

	int mn = -1u/2;

	for(int i=1;i<=n/2;i++) {

		int a = sum_digit(i) + sum_digit(n-i);

		if(mn > a) mn = a;

	}

	cout << mn;

}

// Optimized solution to the same problem (faster):
#include <cstdio>



using namespace std; 



int sum_of_digit[100001];



int main() {

    int N;

    scanf("%d", &N);



    int prefix_sum = 0;

    int cur_sum = 0;

    for (int i = 0; i < N; i++) {

        int cur_digit_sum = 0;

        int cur_number = i;

        while (cur_number > 0) {

            cur_digit_sum += cur_number % 10;

            cur_number /= 10;

        }

        sum_of_digit[i] = cur_digit_sum;

    }

    

    int min = (1 << 31) - 1;

    int round = (N >> 1) + 1;

    for (int i = 1; i <= round; i++) {

        int pair = N - i;

        if (pair >= i) {

            int temp = sum_of_digit[i] + sum_of_digit[pair];

            if (temp < min) {

                min = temp;   

            }

        } else {

            break;

        }

    }

    printf("%d\n", min);

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;

int main()

{

   int n,ans = 1e6,mn = 1e6;string l , r;

  cin>>n;

  for(int i = 1 ; i <= n / 2 + 1 ;i ++)

  {

    stringstream ss;

    ss << i;

    string str = ss.str();

    l = str;

    stringstream ss1;

    ss1 <<n - i;

    str = ss1.str();

    r = str;int a= 0,b = 0;

    for(int j = 0 ; j < l.size() ;j ++)

    {

      a+=l[j] - 48;

    }

    for(int j = 0 ;j < r.size(); j ++)

    {

      b+=r[j] - 48;

    }

     ans = min(ans,a + b);

  }cout<<ans;

}


// Optimized solution to the same problem (faster):
#include<bits/stdc++.h>

using namespace std;

int main(){

    int num,total=0;

    scanf("%d",&num);



    while(num){

        total = total + num%10;

        num = num/10;

    }

    if(total==1)

        printf("10");

    else

        printf("%d",total);

    return 0;

}

// Fastest known solution for this problem: