#include<bits/stdc++.h>
using namespace std;
int a,b,c;
int main(){
for(int i=100;i<=999;i++){
a=i%10;
b=i/10%10;
c=i/100%10;
if(a*a*a+b*b*b+c*c*c==i){
cout<<i<<endl;
}
}
return 0;
}
/**************************************************************
Problem: 1058
User: zkl
Language: C
Result: Compile Error
****************************************************************/