         <?php
  $fr = fopen("php://stdin", "r");
  $fw = fopen("php://stdout", "w");

  fscanf($fr, "%s", $r1);
  fscanf($fr, "%s", $r2);
   date_default_timezone_set("America/Los_Angeles");
   $s=  strtotime("+$r2 minutes",  strtotime($r1));

 fprintf($fw, date('H:i' , $s));

  fclose($fr);
  fclose($fw);
?>


<?php
// 82A 	    Double Cola

$in = fopen("php://stdin", 'r');

$input_line = fgets($in);
$n = (int) $input_line;

$a = array("Sheldon", "Leonard", "Penny", "Rajesh", "Howard");

$group = 5;
$i = 1;
$pos = 5;
$out = '';

while ($pos < $n) {
    $group *= 2;
    $i *=2;
    $pos += $group;
}

for ($j=4; $j >= 0 ; $j--) {
    $pos -= $i;
    if ($pos < $n) {
        $out = $a[$j];
        break;
    }
}

echo $out;

?>


<?php
$n = trim(fgets(STDIN));
switch($n)
{
    case "1" : echo "Washington"; break;
    case "2" : echo "Adams"; break;
    case "3" : echo "Jefferson"; break;
    case "4" : echo "Madison"; break;
     case "5" : echo "Monroe"; break;
    case "6" : echo "Adams"; break;
    case "7" : echo "Jackson"; break;
    case "8" : echo "Van Buren"; break;
     case "9" : echo "Harrison"; break;
    case "10" : echo "Tyler"; break;
    case "11" : echo "Polk"; break;
    case "12" : echo "Taylor"; break;
     case "13" : echo "Fillmore"; break;
    case "14" : echo "Pierce"; break;
    case "15" : echo "Buchanan"; break;
    case "16" : echo "Lincoln"; break;
     case "17" : echo "Johnson"; break;
    case "18" : echo "Grant"; break;
    case "19" : echo "Hayes"; break;
    case "20" : echo "Garfield"; break;
     case "21" : echo "Arthur"; break;
    case "22" : echo "Cleveland"; break;
    case "23" : echo "Harrison"; break;
    case "24" : echo "Cleveland"; break;
     case "25" : echo "McKinley"; break;
    case "26" : echo "Roosevelt"; break;
    case "27" : echo "Taft"; break;
    case "28" : echo "Wilson"; break;
     case "29" : echo "Harding"; break;
    case "30" : echo "Coolidge"; break;
    case "31" : echo "Hoover"; break;
    case "32" : echo "Roosevelt"; break;
     case "33" : echo "Truman"; break;
    case "34" : echo "Eisenhower"; break;
    case "35" : echo "Kennedy"; break;
    case "36" : echo "Johnson"; break;
     case "37" : echo "Nixon"; break;
    case "38" : echo "Ford"; break;
    case "39" : echo "Carter"; break;
    case "40" : echo "Reagan"; break;

}


<?php
$s = trim(fgets(STDIN));
if (preg_match('/^[a-z][A-Z]*$/', $s))
    echo ucfirst(strtolower($s));
else if (preg_match('/^[A-Z]*$/', $s))
    echo strtolower($s);
else
    echo $s;
?>


<?php
print preg_match('/[HQ9]/',trim(fgets(STDIN)),$m) ? 'YES' : 'NO';


<?php

$input = trim(fgets(STDIN));
$arr = str_split($input);
$n = count($arr);

// One digit
for ($i = 0; $i < $n; $i++)
{
    if (check($arr[$i]))
    {
        exit;
    }

    $str2 = $arr[$i];
    // Two digits
    for ($j = $i + 1; $j < $n; $j++)
    {
        $str2 = $str2 . $arr[$j];
        // echo $str2 . "\n";
        if (check($str2))
        {
            exit;
        }

        // Three digits
        $str3 = $str2;
        for ($k = $j + 1; $k < $n; $k++)
        {
            $str3 = $str3 . $arr[$k];
            if (check($str3))
            {
                exit;
            }
            $str3 = $str2;
        }

        $str2 = $arr[$i];
    }
}

echo 'NO';

function check($str)
{
    if ((int)$str % 8 == 0)
    {
        echo "YES\n$str";
        return true;
    }

    return false;
}


<?php

list($x, $y) = explode(' ', line());

$x = intval($x);
$y = intval($y);

if ($x > 0 && $y > 0) {
  $answer = array(0, $x + $y, $x + $y, 0);
}
elseif ($x > 0 && $y < 0) {
  $answer = array(0, -$x + $y, $x - $y, 0);
}
elseif ($x < 0 && $y > 0) {
  $answer = array($x - $y, 0, 0, -$x + $y);
}
elseif ($x < 0 && $y < 0) {
  $answer = array($x + $y, 0, 0, $x + $y);
}

print implode(' ', $answer);

function line() {
  return trim(fgets(STDIN));
}


<?php
$in = str_replace("\r\n","",file_get_contents("php://stdin"));
$in = explode("/",$in);
$str = "";
foreach($in as $a)
{
if(!empty($a))
{
  $str .="/";
  $str .=$a;
}
}
if(empty($str)) echo "/"; else echo $str;


<?php
list($a, $b, $c) = explode(" ", trim(fgets(STDIN)));
$d = abs($a) + abs($b);
$e = $c - $d;
$f = $e % 2;
if(($f != 0) || ($c < $d))
{
    print "No";
}
else
{
    print "Yes";
}
?>


 <?php
	list($a,$b) = explode(' ',trim(fgets(STDIN)));
	if ($a > $b) list($a,$b) = array($b,$a);
	echo floor(($a + min($b,$a*2))/3);
?>


<?php
$withoutWub= explode("WUB",trim(fgets(STDIN)));
for ($i=0;$i<count($withoutWub);$i++)
{
    if ($withoutWub[$i]!="")echo $withoutWub[$i]." ";
}


<?php
list($a, $b) = explode(" ", trim(fgets(STDIN)));
$c = array_reverse(explode(" ", trim(fgets(STDIN))));
list($d, $e) = explode(" ", trim(fgets(STDIN)));
$f = array_reverse(explode(" ", trim(fgets(STDIN))));
$g = 0;
for($x = 0; $x < $a; $x++)
{
     $g += $c[$x] * pow($b, $x);
}
$h = 0;
for($x = 0; $x < $d; $x++)
{
     $h += $f[$x] * pow($e, $x);
}
if($g < $h)
{
     print "<";
}
elseif($g == $h)
{
     print "=";
}
elseif($g > $h)
{
     print ">";
}
?>


<?php
$a=trim(fgets(STDIN));
$b=trim(fgets(STDIN));
$c=trim(fgets(STDIN));
$arr=array();
$arr[0]=$a + $b * $c;
$arr[1]=$a * ($b + $c);
$arr[2]=$a * $b * $c;
$arr[3]=($a + $b) * $c;
$arr[4]=$a + $b + $c;

echo max($arr);

?>


<?php
$a = str_split(trim(fgets(STDIN)));
$b = array_search("+", $a);
$c = array_search("=", $a);
$d = array_slice($a, 0, $b);
$e = array_slice($a, $b + 1, $c - $b - 1);
$f = array_slice($a, $c + 1);
if(count($d) + count($e) == count($f))
{
    print implode("", $a);
}
elseif((count($f) - (count($d) + count($e))) == 2)
{
    unset($f[0]);
    print implode("", $d) . "|+" . implode("", $e) . "=" . implode("", $f);
}
elseif((((count($d) + count($e)) - count($f)) == 2) && (count($d) != 1))
{
    unset($d[0]);
    print implode("", $d) . "+" . implode("", $e) . "=" . implode("", $f) . "|";
}
elseif((((count($d) + count($e)) - count($f)) == 2) && (count($d) == 1))
{
    unset($e[0]);
    print implode("", $d) . "+" . implode("", $e) . "=" . implode("", $f) . "|";
}
else
{
    print "Impossible";
}
?>


<?php

$data = explode(' ', file_get_contents("php://stdin"));
$data_pos = 0;

function readInt() {
	global $data, $data_pos;
	return intval($data[$data_pos++]);
}

class Point {
	function __construct($x, $y) {
		$this->x = $x;
		$this->y = $y;
	}
	static function read() {
		$x = readInt();
		$y = readInt();
		return new Point($x, $y);
	}
	function eps($d) {
		for ($dx = -$d; $dx <= $d; $dx++)
			for ($dy = -$d; $dy <= $d; $dy++)
				if (abs($dx) + abs($dy) <= $d)
					yield new Point($this->x + $dx, $this->y + $dy);
	}
}

function pr($a, $b, $c) {
	return ($a->x - $b->x) * ($c->x - $b->x) + ($a->y - $b->y) * ($c->y - $b->y) == 0;
}
function area($a, $b, $c) {
	return ($a->x - $b->x) * ($c->y - $b->y) - ($a->y - $b->y) * ($c->x - $b->x);
}
function isRight($a, $b, $c) {
	return (pr($a, $b, $c) || pr($b, $c, $a) || pr($c, $a, $b)) && area($a, $b, $c) != 0;
}
function d($a, $b) {
	return abs($a->x - $b->x) + abs($a->y - $b->y);
}

function check($maxDiff) {
	global $a;
	foreach($a[0]->eps($maxDiff) as $p0)
		foreach($a[1]->eps($maxDiff) as $p1)
			foreach($a[2]->eps($maxDiff) as $p2)
				if (isRight($p0, $p1, $p2) && d($p0, $a[0]) + d($p1, $a[1]) + d($p2, $a[2]) <= $maxDiff)
					return true;
	return false;
}

$a = array_map(function() { return Point::read(); }, range(0, 2));
if (check(0))
	printf("RIGHT\n");
else if (check(1))
	printf("ALMOST\n");
else
	printf("NEITHER\n");
?>


<?php
list($n) = explode(' ', trim(fgets(STDIN)));
$x = intval($n);
$sCheck = false;
if($x < 1 || $x > 100){
    $sCheck = false;
} else {
    for ($i = 1; $i <= $x; $i++) {
        for ($j = 1; $j <= $x; $j++) {
            if (($i * $j > $x) && ($i % $j == 0) && ($j % $i == 0) && (($i / $j) < $x)) {
                $iA = $i;
                $iB = $j;
                $sCheck = true;
                break;
            }
        }
        if($sCheck) break;
    }
}

if($sCheck){
    echo $iA . ' ' . $iB;
} else {
    echo -1;
}


<?php

$a=1;

while($line = trim(fgets(STDIN))) {

	$linhas[]=$line;
	if($a==3) {break;}
	$a++;
}

$array=explode(" ",$linhas[0]);

$n=$array[0];
$l=$array[1];

$arrayDistancia=explode(" ",$linhas[1]);
$arrayBusca=explode(" ",$linhas[2]);

$i=0;

while($i<$l) {

	foreach($arrayDistancia as &$valor) {

		$valor-=1;

		if($valor==-1) {
			array_shift($arrayDistancia); $arrayDistancia[]=$l;
		}

	}

	if($arrayDistancia==$arrayBusca) {
		echo "YES";
		die();
	}

$i++;

}

echo "NO";

?>


<?php
$line1 = explode(' ', trim(fgets(STDIN)));
$n = $line1;
$ch = 81;
$way = array();
function back($ch){
    global $line1, $way;
    if($ch < $line1[0]){
        echo "NO";
        return;
    }
    if($ch == $line1[0]){
        array_push($way, $ch);
        sort($way);

        echo "YES".PHP_EOL;
        echo count($way).PHP_EOL;
        foreach($way as $key =>$item){
            if($key == count($way)-1){
                 echo $item;
                break;
            }
            echo $item.' ';
        }
        return;
    }
    if($ch % 10 == 1){
        array_push($way, $ch);
        return back(substr($ch, 0, -1));
    }else if($ch % 2 == 0){
        array_push($way, $ch);
       return back($ch/2);
    }else{
        echo "NO";
        return;
    }
}
back($line1[1]);


<?php
$a = trim(fgets(STDIN));
$b = substr($a, 1);
if($b % 2 == 0)
{
     print "0";
}
else
{
     print "1";
}
?>


<?php
$a = trim(fgets(STDIN));
$b = array();
$c = 1;
for($x = 0; $x < strlen($a); $x++)
{
     $d = substr($a, 0, strlen($a) - $c);
     $e = substr($a, strlen($a) - $c);
     $a = $e . $d;
     $b[$x] = $a;
}
$f = array_unique($b);
print count($f);
?>


<?php
list($w, $h) = explode(' ', trim(fgets(STDIN)));
list($u1, $d1) = explode(' ', trim(fgets(STDIN)));
list($u2, $d2) = explode(' ', trim(fgets(STDIN)));
$res = $w;
while ($h >= 0) {
    if ($d1 == $h || $d2 == $h) {
        if ($d1 == $h) {
            $res = $res - $u1 + $h;
        }
        if ($d2 == $h) {
            $res = $res - $u2 + $h;
        }
        if ($res < 0) {
            $res = 0;
        }
    } else {
        $res += $h;
    }
    $h--;
}
echo $res;


<?php
        $s1=fgets(STDIN);
        $s2=fgets(STDIN);

        if( strtolower($s1) < strtolower($s2) )
            echo '-1';
        else if( strtolower($s1) > strtolower($s2) )
            echo '1';
        else
            echo '0';

?>


<?php
$handle = fopen ("php://stdin","r");
$line = fgets($handle);
list($n, $t, $k, $d) = explode(" ", $line);
    //8 6 4 5
    //4 2 1 4

$one_oven_rounds = ceil($n/$k);
$one_oven_time = $one_oven_rounds*$t;

$oven1_rounds_while_building = floor((int)$d/(int)$t);

$two_oven_time = max($oven1_rounds_while_building*$t,(int)$d) + ceil(($one_oven_rounds-$oven1_rounds_while_building)/2)*$t; //one round can be done during building the oven

if($two_oven_time < $one_oven_time){
	echo "Yes";
}else{
	echo "No";
}


<?
$i = trim(fgets(STDIN));

echo max(array(
    intval(($i / 10)),
    intval($i/100)*10 + $i%10,
    $i
));
?>


<?php
/** SECTION 0: NOTES **/
/*
Problem:
Codeforces Contest 194 Div 1 Problem A

Author          : chaotic_iak (http://chaoticiak.comlu.com/)
Language        : PHP 5.4
Released under  : CC BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0/)
Template version: 20130720 (http://chaoticiak.comlu.com/prog/assorted/templates.phps)
                           (http://ideone.com/AV2T2U)
*/

/** SECTION 1: SET UP INPUT HANDLER **/
// 0: Don't output format at all
// 1: Trim newline characters only
// 2: Assume \x00..\x20 (accaw) as delimiters and output as array

if (isset($inputstream)) {$stdin = $inputstream;} else {$stdin = fopen("php://stdin", "r");}
function g($format = 2) {
    global $stdin;
    $input = fgets($stdin);
    if ($format == 0) {return $input;}
    $input = trim($input, "\n\r");
    if ($format == 1) {return $input;}
    $input = trim($input, "\x00..\x20");
    $input = preg_replace("/[\\x00-\\x20]+/", " ", $input);
    return explode(" ", $input);
}

/** SECTION 2: IMPORT FUNCTIONS FROM chaotic_iak'S LIBRARY **/
// none

/** SECTION 3: SOLVING THE PROBLEM **/
$n = g(1);

while (bcmod($n, 3) == 0) {
	$n = bcdiv($n, 3);
}

echo bcadd(bcdiv($n,3), 1);


<?php
$x = trim(fgets(STDIN));

$xLen = strlen($x);

$xResult = $x;
$xMax = '';

function findLast9StreakPosition($number){
    $position = 0;
    $numberLen = strlen($number);
    for($i = 1; $i < $numberLen; ++$i){
        if($number[$i] < 9){
            break;
        }
        $position = $i;
    }

    return $position;
}

if($xLen > 1){
    if($x[0] > 1){
        if($x[1] == 9){
            $last9StreakPosition = findLast9StreakPosition($x);
            $xMax .= $x[0];
            $xMax .= str_repeat('9', $last9StreakPosition);

            $xMaxLen = strlen($xMax);
            if($xLen > $xMaxLen){
                $xMax[$last9StreakPosition] = $xMax[$last9StreakPosition] - 1;
                $xMax .= str_repeat('9', $xLen - $xMaxLen);
            }
        }else{
            $xMax = $x[0] - 1;
            $xMax .= str_repeat('9', $xLen - 1);
        }

        $xMaxSum = array_sum(str_split($xMax));
        $xSum = array_sum(str_split($x));

        if($xMaxSum > $xSum){
            $xResult = $xMax;
        }
    }else{
        if($x[1] > 0){
            if($x[1] < 8){
                $xMax = $x[0] - 1;
                $xMax .= str_repeat('9', $xLen - 1);
                $xMax = (string)intval($xMax);
            }
            else{
                if($x[1] == 9){
                    $last9StreakPosition = findLast9StreakPosition($x);
                    $xMax .= $x[0];
                    $xMax .= str_repeat('9', $last9StreakPosition);

                    $xMaxLen = strlen($xMax);
                    if($xLen > $xMaxLen){
                        $xMax[$last9StreakPosition] = $xMax[$last9StreakPosition] - 1;
                        $xMax .= str_repeat('9', $xLen - $xMaxLen);
                    }
                }else{
                    $xMax = $x[0] - 1;
                    $xMax .= str_repeat('9', $xLen - 1);
                    $xMax = (string)intval($xMax);
                }
            }

            $xMaxSum = array_sum(str_split($xMax));
            $xSum = array_sum(str_split($x));

            if($xMaxSum > $xSum){
                $xResult = $xMax;
            }
        }else{
            $xMax .= str_repeat('9', $xLen - 1);

            $xMaxSum = array_sum(str_split($xMax));
            $xSum = array_sum(str_split($x));

            if($xMaxSum > $xSum){
                $xResult = $xMax;
            }
        }
    }
}

echo $xResult.PHP_EOL;


<?php
$a = " " . trim(fgets(STDIN));
$b = "CODEFORCES";
$c = strpos($a, $b);
if(($c === 1) || ($c === (strlen($a) - 10)))
{
    print "YES";
}
else
{
    $d = array("C", "CO", "COD", "CODE", "CODEF", "CODEFO", "CODEFOR", "CODEFORC", "CODEFORCE");
    $e = array("ODEFORCES", "DEFORCES", "EFORCES", "FORCES", "ORCES", "RCES", "CES", "ES", "S");
    $f = 0;
    for($x = 0; $x < 9; $x++)
    {
        $g = substr($a, 1, $x + 1);
        $h = substr($a, strlen($a) - 9 + $x);
        if(($g == $d[$x]) && ($h == $e[$x]))
        {
            $f = 1;
            break;
        }
    }
    if($f == 1)
    {
        print "YES";
    }
    else
    {
        print "NO";
    }
}
?>


<?php

function readArrayInt($std)
{
    $str = fgets($std);
    $str = explode(' ', $str);
    $a = [];
    $n = count($str);
    for ($i = 0; $i < $n; ++$i)
    {
        $a[] = $str[$i] + 0;
    }
    return $a;
}

function isDelimiter($ch)
{

    if ($ch == '(' || $ch == ')' || $ch == '_')
    {
        return true;
    }
    return false;
}

$stdin = fopen("php://stdin", 'r');
fscanf($stdin, "%d\n", $n);
$str = trim(fgets($stdin));
$res1 = 0;
$res2 = 0;
$inB = false;
for ($i = 0; $i < strlen($str); ++$i)
{
    if (isDelimiter($str[$i]))
    {
        if ($str[$i] != '_')
        {
            $inB = ($str[$i] == '(');
        }
        continue;
    }
    $word = '';
    while ($i < strlen($str) && !isDelimiter($str[$i]))
    {
        $word .= $str[$i];
        $i++;
    }
    if ($inB == true)
    {
        $res2++;
    }
    else
    {
        $res1 = max($res1, strlen($word));
    }
    $i--;
}
echo $res1 . " " . $res2;

fclose($stdin);
?>


<?php

$values = array_map('intval', explode(' ',trim(fgets(STDIN))));
$k = $values[0];
$n = $values[1];
$s = $values[2];
$p = $values[3];

$spp = ceil($n / $s);
$s = $spp * $k;
$packs = ceil($s / $p);

echo $packs."\n";


<?php

// http://codeforces.com/problemset/problem/158/A

// input
// The first line of the input contains two integers n and k (1 ≤ k ≤ n ≤ 50) separated by a single space.
fscanf(STDIN, "%d %d", $n, $k);
// The second line contains n space-separated integers a1, a2, ..., an (0 ≤ ai ≤ 100), where ai is the score earned by the participant who got the i-th place. The given sequence is non-increasing (that is, for all i from 1 to n - 1 the following condition is fulfilled: ai ≥ ai + 1).

$scores_string = fgets(STDIN);

$a = explode(" ", trim($scores_string));

// "Contestant who earns a score equal to or greater than the k-th place finisher's score will advance to the next round, as long as the contestant earns a positive score..." — an excerpt from contest rules.
$quantity_that_will_advance = 0;
$kth_place_score = (int)$a[$k-1];
foreach ($a as $score)
{
	$score_int = (int)$score;
	if ( ( (int)$kth_place_score <= $score_int ) && $score_int )
		$quantity_that_will_advance++;
	else
		break;
}

// output
// the number of participants who advance to the next round.
echo "{$quantity_that_will_advance}";

?>


<?php

function check($d,$s)
{
    $c=0;
    while($d<=$s)
    {
        $d=$d*3;
        $s=$s*2;
        $c++;
    }
    return $c;
}
function solve()
{
    $server="php://stdin";
    $local="input.txt";
    $handle = fopen($server, "r");
    $d=0;$s=0;
    fscanf($handle, "%d %d", $d,$s);
    printf("%d", check($d,$s));
}

solve();
?>


<?php
$a = trim(fgets(STDIN));
$b = trim(fgets(STDIN));
$c = trim(fgets(STDIN));
$d = 0;
while(TRUE)
{
     if($a > 0)
     {
          if($b > 1)
          {
               if($c > 3)
               {
                    $a -= 1;
                    $b -= 2;
                    $c -= 4;
                    $d += 7;
               }
               else
               {
                    break;
               }
          }
          else
          {
               break;
          }
     }
     else
     {
          break;
     }
}
print $d;
?>


<?php

$fl = STDIN;//fopen("input.txt","r");

fscanf($fl,"%d%d%d",$n, $m, $d);
$b = array_fill(0,$n, array('xa'=>0, 'ya'=>0));
$xa = array_fill(0,$n,0);
$ya = array_fill(0,$n,0);

for($i=0;$i<$n;++$i)
{
	fscanf($fl, "%d%d", $x, $y);
    $b[$i] = array ('xa'=>$x, 'ya'=>$y);
    $xa[$i] = $x;
    $ya[$i] = $y;
}

array_multisort($xa, SORT_DESC, $ya, SORT_ASC, $b);

$c = array_fill(0,$m, array('xa'=>0, 'ya'=>0));
$xa = array_fill(0,$m,0);
$ya = array_fill(0,$m,0);

for($i=0;$i<$m;++$i)
{
	fscanf($fl, "%d%d", $x, $y);
    $c[$i] = array ('xa'=>$x, 'ya'=>$y);
    $xa[$i] = $x;
    $ya[$i] = $y;
}
array_multisort($xa, SORT_DESC, $ya, SORT_ASC, $c);

$prefx = array_fill(0,$m, '0');
$prefy = array_fill(0,$m, '0');
$i = 0;
$curx = '0';
$cury = '0';
foreach ($c as $key => $row) {
    $prefx[$i] = bcadd($curx, strval($row['xa']));
    $prefy[$i] = bcadd($cury, strval($row['ya']));
    $curx = $prefx[$i];
    $cury = $prefy[$i];
    $i = $i + 1;
}

$curx = '0';
$cury = '0';
$ans = '0';

$l = $m - 1;
foreach ($b as $key => $row) {
    $cury = bcadd($cury, strval($row['ya']));
    $curx = bcadd($curx, strval($row['xa']));
    //printf ("%s\n", strval($row['xa']));
    while ($l >= 0 && bccomp(bcadd($prefy[$l], $cury), $d) == 1) {
        $l = $l - 1;
    }
    /*$r = $m; $l = -1;
    while ($r - $l > 1) {
        $t = floor(($r + $l) / 2);
        if (bccomp(bcadd($prefy[$t], $cury), $d) != 1) $l = $t;
        else $r = $t;
    }*/
    if ($l > -1) {
       $res = bcadd($prefx[$l], $curx);
       if (bccomp ($res, $ans) == 1){
           $ans = $res;
       }
    }
}
printf ("%s\n", $ans);

/*for($i=0;$i<$n;++$i) {
    printf ("%d %d\n", $b[i]['xa'], $b[i]['ya']);
}*/
//printf("%d\n", $n);


<?
$dir = stream_get_contents(fopen("php://stdin", 'r'));
$a = explode("\n",$dir);
unset($dir);
$gods = explode(" ",$a[1]);
echo (array_sum($gods)/$a[0]);


<?php
list($n, $m, $k) = array_map('intval', explode(' ', trim(fgets(STDIN))));
if ($n > $m || $n > $k) {
    echo 'No';
} else {
    echo 'Yes';
}


<?php

$tc = readline();
$hc = readline();

for($i = 0; $i < strlen($hc); $i++) {
    if($tc[0] == $hc[$i] or $tc[1] == $hc[$i]) {
        echo "YES\n";
        break;
    }
}

if($i == strlen($hc)) echo "NO\n";


<?php

$in_n = trim(fgets(STDIN));
$in_s = str_split(trim(fgets(STDIN)));

$s = 0;

for($i = 0; $i < sizeof($in_s); $i++)
{
	if(ctype_upper($in_s[$i]))
		$s++;
}

$c = sizeof($in_s) / 2;

// your code goes here

if($s == $c)
{
	echo 0 . PHP_EOL;
	echo implode($in_s);
	return;
}

if($s < $c)
{
	$o = $c - $s;
	echo $o . PHP_EOL;

	for($i = 0; ($i < sizeof($in_s) && $o > 0); $i++)
	{
		if(ctype_lower($in_s[$i]))
		{
			$in_s[$i] = 'X';
			$o--;
		}
	}

	echo implode($in_s);
	return;
}

$o = $s - $c;

echo $o . PHP_EOL;
for($i = 0; $i < sizeof($in_s) && $o > 0; $i++)
{
	if(ctype_upper($in_s[$i]))
	{
		$in_s[$i] = 'x';
		$o--;
	}
}

echo implode($in_s);


<?php
$line = trim(fgets(STDIN)); // reads one line from STDIN

$array=explode(" ",$line);

$mes = $array[0];
$dia = $array[1];

switch($mes) {

case 1:
$dias = 31;
break;

case 2:
$dias = 28;
break;

case 3:
$dias = 31;
break;

case 4:
$dias = 30;
break;

case 5:
$dias = 31;
break;

case 6:
$dias = 30;
break;

case 7:
$dias = 31;
break;

case 8:
$dias = 31;
break;

case 9:
$dias = 30;
break;

case 10:
$dias = 31;
break;

case 11:
$dias = 30;
break;

case 12:
$dias = 31;
break;

}

$diasTotal = $dias + $dia -1;

 // echo "Dias : $dias". "dia : $dia";

 // die();

$float=($diasTotal/7);

$int=intval($diasTotal/7);

$float > $int ? $int+=1 : null;

echo $int;