#include<iostream>
#include<cmath>
using namespace std;
int main() {
int x = 100;
do {
int a = 0;
int b = 0;
int c = 0;
a = x % 10;
b = x / 10 % 10;
c = x / 100 % 10;
if (pow(a, 3) + pow(b, 3) + pow(c, 3) == x) {
cout << x << endl;
}
x++;
} while (x < 1000);
return 0;
}