if (C.TotalDistance / 1000 < 50)
{
putyourbuttonhere("Level: 0")
}
else if (C.TotalDistance / 1000 < 100)
{
putyourbuttonhere("Level: 1")
}