#include using namespace std; #define fi first #define se second #define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define rep(i,n) repl(i,0,n) #define each(itr,v) for(auto itr:v) #define pb(s) push_back(s) #define mp(a,b) make_pair(a,b) #define all(x) (x).begin(),(x).end() #define dbg(x) cout<<#x"="<(x).count() typedef long long ll; typedef unsigned long long ull; typedef pair P; typedef pair PPI; typedef pair PL; typedef pair PPL; #define INF INT_MAX/3 #define MAX_N 1000 int gcd(int a,int b){ return b?gcd(b,a%b):a; } string s; bool used[11]; bool judge_seven(string s){ ll sum=0; for(int r=s.length(),cnt=1;r>0;r-=3,cnt++){ if(cnt%2==0){ sum-=stoi(s.substr(max(0,r-3),3)); }else{ sum+=stoi(s.substr(max(0,r-3),3)); } } return (sum+777777777)%7==0; } int main(){ cin.sync_with_stdio(false); cin>>s; int sum=0; rep(i,s.length()){ used[s[i]-'0']=true; if(s[i]-'0')sum+=(s[i]-'0'); } int cnt=0; rep(i,10){ if(used[i])cnt++; } if(cnt==1)cout<