#include #ifndef DUMP #define DUMP(...) (void)0 #endif using namespace std; int main() { cin.tie(nullptr)->sync_with_stdio(false); int n; cin >> n; cout << n % 9 + 1 << '\n'; }