open System type Sol() = member this.Solve() = let L = stdin.ReadLine() |> int let M = stdin.ReadLine() |> int let N = stdin.ReadLine() |> int let ans = (N%25) + ( ((N/25)+M)%4 ) + ( L + ((N/25)+M)/4 ) % 10 ans |> printfn "%d" let mySol = new Sol() mySol.Solve()