#include [[nodiscard]] static inline constexpr uint_fast32_t solve(const std::array& B) noexcept { return UINT32_C(55) - std::accumulate(B.begin(), B.end(), UINT32_C(0)); } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); std::array B = { 0, }; for (auto& b : B) std::cin >> b; std::cout << solve(B) << '\n'; return 0; }