    import std.stdio, std.string, std.array, std.conv, std.algorithm, std.typecons, std.range, std.container, std.math, std.algorithm.searching, std.functional,std.mathspecial;
     
    void main(){
        auto ab=readln.split.map!(to!int).array;
        writeln((ab[0]+ab[1])%24);
    }