Загрузка данных


length, speed, time = map(int, input().split())

dist = speed * time

print(max(0, length - dist))




n = int(input())

total = 0
current = 0
maximum = 0

for i in range(n):
    command, duration = input().split()
    duration = int(duration)

    if command == 'F' or command == 'B':
        total += duration
        current += duration
    else:
        maximum = max(maximum, current)
        current = 0

maximum = max(maximum, current)

print(total, maximum)




rows, cols = map(int, input().split())

field = []
for i in range(rows):
    field.append(input())

x, y, angle = map(int, input().split())

n = int(input())

packets = {}

for i in range(n):
    number, command = input().split()
    packets[int(number)] = command

blocked = 0

dx = [1, 0, -1, 0]
dy = [0, 1, 0, -1]

angle = angle // 90

for number in sorted(packets):
    command = packets[number]

    if command == 'L':
        angle = (angle - 1) % 4

    elif command == 'R':
        angle = (angle + 1) % 4

    else:
        step = 1

        if command == 'B':
            step = -1

        new_x = x + dx[angle] * step
        new_y = y + dy[angle] * step

        if new_x < 0 or new_x >= cols or new_y < 0 or new_y >= rows:
            blocked += 1
        elif field[rows - 1 - new_y][new_x] == '#':
            blocked += 1
        else:
            x = new_x
            y = new_y

print(x, y, angle * 90, blocked)





n, w, k, d = map(int, input().split())
a = list(map(int, input().split()))

danger = 0
length = 0
start = 0
best_start = 0
best_length = 0

for i in range(n):
    if a[i] != -1 and a[i] <= d:
        danger += 1

    if i >= w:
        if a[i - w] != -1 and a[i - w] <= d:
            danger -= 1

    if danger >= k:
        if length == 0:
            start = i + 1

        length += 1

        if length > best_length:
            best_length = length
            best_start = start
    else:
        length = 0

print(best_start, best_length)