#include <algorithm>
#include <iostream>
#include <string>
using namespace std;
string convert_base(long long number, const int base) {
const char digits[] = "0123456789ABCDEF";
string box;
while (number) {
box = digits[number % base] + box;
number /= base;
}
return box;
}
long long power(const int num, const int base) {
auto result = 1LL;
for (auto i = 0; i < base; ++i) result *= num;
return result;
}
int main() {
const auto a = power(49, 6) + power(7, 19) - 21;
cout << "Base10: " << a << '\n';
const auto b = convert_base(a, 7);
cout << "Base7: " << b << '\n';
const auto n = count(begin(b), end(b), '0');
cout << "Number of zeros: " << n << '\n';
}